Weird RSS Feed Problem
Posted: 02 July 2008 07:07 AM   [ Ignore ]  
Summer Student
Total Posts:  4
Joined  07-01-2008

Hi all,

I’m requesting for your assistance on finding why we are having trouble with RSS feeds. If you take a good look at both RSS links:

http://deaftimes.net/index.php/news/rss_email/C5/

http://deaftimes.net/index.php/news/rss_email/C7/

C5 - USA-L news (fail to load)
C7 - Ohio News (works fine)

The template I’m using for the rss_email feed:

{assign_variable:master_weblog_name=“news”}
{assign_variable:main_group=“site”}
{assign_variable:lib_group=“lib”}
{assign_variable:news_group=“news”}
{exp:rss:feed weblog=”{master_weblog_name}”}

<?xml version=“1.0” encoding=”{encoding}”?>
<rss version=“2.0”
  xmlns:dc=“http://purl.org/dc/elements/1.1/”
  xmlns:sy=“http://purl.org/rss/1.0/modules/syndication/”
  xmlns:admin=“http://webns.net/mvcb/”
  xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
  xmlns:content=“http://purl.org/rss/1.0/modules/content/”>

  <channel>
 
  <title>{weblog_name}: {exp:xml_encode}{exp:weblog:category_heading}{category_name}{/exp:weblog:category_heading}{/exp:xml_encode}</title>
  <link>{weblog_url}</link>
  <description>{weblog_description}</description>
  <dc:language>{weblog_language}</dc:language>
  <dc:creator>{email}</dc:creator>
  <dc:rights>Copyright {gmt_date format=”%Y”}</dc:rights>
  <dc:date>{gmt_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
  <aresource=“http://expressionengine.com/”>
 
{exp:weblog:entries weblog=”{master_weblog_name}” limit=“20” rdf=“off” status=“open” dynamic_start=“on” disable=“member_data|trackbacks”}
  <item>
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>

    <link>{title_permalink=”{news_group}/article”}?utm_medium=RSS</link>

    <guid>{title_permalink=”{news_group}/article”}?utm_medium=RSS#When:{gmt_entry_date format=”%H:%i:%sZ”}</guid>

    <description><![CDATA[{news_body}]]></description>

    <dc:subject>{exp:xml_encode}{categories backspace=“1”}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>

    <dc:date>{gmt_entry_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
  </item>
{/exp:weblog:entries}
 
  </channel>
</rss>

{/exp:rss:feed}

The troublesome line is:

<description><![CDATA[{news_body}]]></description>

If I replaced that <description> line with this line

<description>{exp:xml_encode}{news_body}{/exp:xml_encode}</description>

RSS feed works fine.

Can you tell me what is wrong with it?

Thanks in advance,

Robert J. Rademacher

Profile
 
 
Posted: 02 July 2008 07:32 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

I ran it through a validator (results- looks like you’ve got a some js in there and it’s not liking- well, looks like it’s the end of the comment code.  Why it wouldn’t like it encoded I’m not sure.  But- real quick, can you try editing that entry- tweak that the use >.  See if it matters.

Can you see the bit I’m talking about?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 02 July 2008 06:48 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  4
Joined  07-01-2008

Hi,

Many thanks for using the feed validator link, which is very helpful.

The RSS Feed template has this description line, as shown below:

<description><![CDATA[{news_body}]]></description>

This important line is used for “pasting” the data through {news_body} field. Now, take a look at the snippet of where the offensive section is shown below (look for OFFENSIVE LINE AS SHOWN BELOW:):

<description><![CDATA[<p>From the newsroom of the Lawrence Journal-World, Lawrence, Kansas, Sunday, June 29, 2008 ..... </p>
<p><span style=“font-size: small;”><strong>Deaf cheerleaders bring new beat to <span class=“caps”>KU</span>  camp</strong> </span></p>
<p>http://media.lawrence.com/img/croppedphotos/2008/06/29/mascot_cheer_camp_horizontal_t640.jpg?a6ea3ebd4438a44b86d2e9c39ecf7613005fe067 Photo by John Henry.</p>
<p><em>Various mascots carry off Emily Ellison during a performance practice Saturday at the KU Spirit Camp at Anschutz Sports Pavilion.</em></p>
<p>By Erin Castaneda</p>
<p>Through the vibrations of a drum, six cheerleaders from the Kansas School for the Deaf commanded people’s attention at Kansas University’s Spirit Camp.</p>

<snip> - remaining news are removed to fit here

“I just feel like we’re in a big group.  It’s wonderful. I feel great.”</p>
<div class=“subscription-ad”>
[removed]<!—
//<![CDATA[
  var m3_u = (location.protocol==‘https:’?‘https:///ajs.php’:‘http://ads2.ljworld.com/www/delivery/ajs.php’);
  var m3_r = Math.floor(Math.random()*99999999999);
  if (!document.phpAds_used) document.phpAds_used = ‘,’;
  [removed] (”<scr”+“ipt type=‘text/javascript’ src=’”+m3_u);
  [removed] (”?zoneid=57”);
  [removed] (’&cb;=’ + m3_r);
  if (document.phpAds_used != ‘,’) [removed] (”&exclude;=” + document.phpAds_used);
  [removed] (”&loc;=” + escape([removed]));
  if (document.referrer) [removed] (”&referer;=” + escape(document.referrer));
  if (document.mmm_fo) [removed] (”&mmm_fo=1”);
  [removed] (”’></scr”+“ipt>”);
  //]]>—>

OFFENSIVE LINE AS SHOWN BELOW:

// -->[removed]


//—& gt; < / script >

http://feedvalidator.org/check.cgi?url=http://deaftimes.net/index.php/news/rss_email/C5/#l554[/quote]

[removed][removed]
Congrats Jayhawks! Get the official 2008 Championship DVD at CBSstore.com</div>
<div class=“subscription-ad”><br /></div>
<div class=“subscription-ad”>© Copyright 2008 The Lawrence Journal-World. All rights reserved.</div>
<div class=“subscription-ad”><br /></div>
<div class=“subscription-ad”>+———————————————————————————<br /> Do not forward this news/information. Tell your friends to subscribe directly to USA-L News at http://www.deaftimes.com<br /> <br /> A public service of Creative Designers. Copyright 2008. <br /> <br /> This material may not be published, broadcast, rewritten, or redistributed. If you wish to reprint this article, you are hereby required to obtain copyright permission from the publisher of the article, not USA-L News.<br /> <br /> Deaf Times is not responsible for the content of USA-L News.<br /> +———————————————————————————<br /> <br /> <br /></div>
<div class=“subscription-ad”><br /></div>
<div class=“subscription-ad”>
<div id=“beacon_928” style=“left: 0px; visibility: hidden; position: absolute; top: 0px;”>http://ads2.ljworld.com/www/delivery/lg.php?bannerid=928&campaignid=533&zoneid=57&loc=http://www2.ljworld.com/news/2008/jun/29/deaf_cheerleaders_bring_new_beat_ku_camp/&referer=http://search.news.yahoo.com/search/news/?adv=1&p=deaf&ei=UTF-8&c=news&o=a&s;=-date-$s&n=20&2=7&3;=&cb=a1242d4549</div>
</div>]]></description>

I am not sure where this [color=red]//—& gt ; < / script >[/color] line comes from, as I am unable to find it anywhere in the templates.

Please advise.

Many thanks,

Robert

Profile
 
 
Posted: 03 July 2008 07:04 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  4
Joined  07-01-2008

I figured out what is wrong. It’s the post that is not clean. I used “Edit” section in xe administration and removed the offensive codes. After that…it works.

Thanks for pointing out the problem…where I can find it easily.

Cheers!

Robert

Profile
 
 
Posted: 03 July 2008 07:15 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

Gah- you’re too fast for me.  Yep- it had to be in that particular entry.  Looks to me like a > was encoded.  Though in truth- I’m not dead sure why it caused the feed to not validate.  Or why it happend with just that one entry.

But- glad you got it spotted.  We good to close this one out?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64933 Total Logged-in Users: 54
Total Topics: 81899 Total Anonymous Users: 33
Total Replies: 440259 Total Guests: 266
Total Posts: 522158    
Members ( View Memberlist )
Newest Members:  Kathryn DaviesPetrovichusharurblaisdellLevagstudioigotthelemonmileswkakiharaAurels