PHP Classes

Property required "guid"

Recommend this page to a friend!

      RSS Writer class  >  All threads  >  Property required "guid"  >  (Un) Subscribe thread alerts  
Subject:Property required "guid"
Summary:Property required "guid" error
Messages:4
Author:fafdsafs
Date:2011-10-05 13:42:11
Update:2011-10-06 06:42:00
 

  1. Property required "guid"   Reply   Report abuse  
Picture of fafdsafs fafdsafs - 2011-10-05 13:42:11
Hi,

I am using this class, and following the website example, I get the error:

Error: it was not specified the required item property "guid"
................

How to set this property. I am seeing the tool documentation and don't see anything.


Thaks.


  2. Re: Property required "guid"   Reply   Report abuse  
Picture of fafdsafs fafdsafs - 2011-10-05 13:58:56 - In reply to message 1 from fafdsafs
Excuse me, I am using the 2.0 RSS specification.

  3. Re: Property required "guid"   Reply   Report abuse  
Picture of Bernard Treves Brown Bernard Treves Brown - 2011-10-05 20:55:42 - In reply to message 2 from fafdsafs
Hi,
Amending the appropriate portion of the example, just add an extra line

$properties=array();
$properties['description']='Latest components made available';
$properties['link']='http://www.phpclasses.org/browse/latest/latest.xml';
$properties['guid']='http://www.phpclasses.org/browse/latest/latest.xml';
$properties['title']='Latest class entries';
$properties['dc:date']='2002-05-06T00:00:00Z';
$rss_writer_object->additem($properties);

Note that a guid should be unique to this item - so if you amend the item an RSS reader will update the old item rather than creating a new one (leaving you with two items about the same happening).

Bernard

  4. Re: Property required "guid"   Reply   Report abuse  
Picture of fafdsafs fafdsafs - 2011-10-06 06:42:00 - In reply to message 3 from Bernard Treves Brown
Thank you very much. I try it.