Page 1 of 1
SOLVED: Why am I suddenly getting an error with CGFeedmaker?
Posted: Mon Dec 06, 2010 11:01 am
by tdlwebs
I set up an RSS feed for the news section on one of my sites and it was working fine, but now there is an error and I'm not sure why it has happened. The error says:
error on line 13 at column 56: xmlParseEntityRef: no name
Any ideas as to why this seems to have just randomly occurred?
T
Re: Why am I suddenly getting an error with CGFeedmaker?
Posted: Mon Dec 06, 2010 8:31 pm
by Jeff
Can you please post your template?
Re: Why am I suddenly getting an error with CGFeedmaker?
Posted: Tue Dec 07, 2010 3:14 pm
by tdlwebs
Code: Select all
{* rss feed template *}
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
{* note: if you have not configured pretty urls or mod rewrite, the next line may fail when trying to validate the feed *}
<atom:link href="{$feed_url}" rel="self" type="application/rss+xml" />
<title>{$feed.title}</title>
{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
{if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
{news category='General' assign='junk'}
{foreach from=$items item='entry'}
<item>
<title>{$entry->title|cms_html_entity_decode}</title>
{capture assign='description'}{if isset($entry->summary)}{$entry->summary}{else}{$entry->content}{/if}{/capture}
<description>{$description|trim|strip_tags|summarize:40}</description>
<link>{$entry->moreurl}</link>
</item>
{/foreach}
</channel>
</rss>
Re: SOLVED: Why am I suddenly getting an error with CGFeedmaker?
Posted: Tue Dec 07, 2010 3:32 pm
by tdlwebs
Looks like I've managed to fix it now thanks to a very useful article / tutorial at
http://searchenginewatch.com/2175271 and with the help of
http://feedvalidator.org/
It looks like the culprit was an ampersand in a news article title. Anyway, I've learned a lot
T