[typo] Invalid RSS feed
adamgill1 at gmail.com
Fri Jul 20 11:17:02 EDT 2007
Adam Gill wrote:
> 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:
> 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?
> Adam Gill
> Typo-list mailing list
> Typo-list at rubyforge.org
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