[typo] Invalid RSS feed

Adam Gill adamgill1 at gmail.com
Fri Jul 20 11:17:02 EDT 2007


Adam Gill wrote:
> Hey,
> I'm having some trouble with my Typo blog's RSS feed 
> (http://blog.gillspatch.co.uk/xml/rss20/feed.xml). The feed validator 
> shows the following error: 
> http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fblog.gillspatch.co.uk%2Fxml%2Frss20%2Ffeed.xml
>
> Basically, within the "<author>" tags, whatever script generates the xml 
> file is putting my username/display name/etc. ("Gilly")  instead of my 
> email address. RSS 2.0 specifications say that an email address should 
> be within the "<author>" tags, so this is obviously a problem.
>
> There are two ways of fixing this. One way is to edit the file that 
> generates the xml file so that my email address is inserted within the 
> "<author>" tags, and the other is to edit it so that the "<author>" tag 
> itself is replaced by the "<dc:creator>" tag, so the line in the file 
> would look like "<dc:creator>Gilly</dc:creator>".
>
> Unfortunately, I don't know how to do either. Can anyone give me some 
> advice so I can generate a valid RSS feed?
>
> Regards,
> Adam Gill
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
>
>   
Seems I managed to fix it. In app/views/xml, there's a file 
"_rss20_item_article.rxml". In there was the line "author = 
item.user.name rescue item.author". This was the problem line, so I 
changed it to 'author = "<myemailaddress>" rescue item.author' and now 
my feed validates.

Interestingly, there was a line below it which read "email = 
item.user.email rescue nil". I tried using "item.user.email" when fixing 
the above error (so the line read "author = item.user.email rescue 
author") but this did not have the desired effect of inserting my email 
address in the author tags of the RSS feed, so I had to define the 
"author" variable as my email address as a string. I'm not sure what's 
wrong here; does everyone else's feed validate?


More information about the Typo-list mailing list