RSS Feed Issue

Discussion in 'Programming' started by RedDem0n, Apr 19, 2009.

  1. #1
    For some reason, my coldfusion RSS feed was working fine validating 2 days ago...Now I'm getting two errors and I'm not sure why.

    I checked my feed to make sure there were no repeat occurrences of 19886, and it wasn't. The only common thing I found was there was some repeating titles on some of the other entries in the feed, but the values are different in all of them that's within the GUID field. So I'm not sure why it says repeat occurrences, besides the title...

    Also, the item tag misplace is also another weird issue that popped up....The feed itself looks fine. Any help would be most appreciated.

    Below is the code:

    
    <cfsavecontent variable="theXML">
    <cfoutput><?xml version="1.0" encoding="ISO-8859-1" ?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
        <channel>
           <title>RSS</title>
           <link>http://www.blahblah.com</link>
           <description>Latest Postings</description>
           <language>en-us</language>
           <copyright>Copyright 2009 Blah Blah Online</copyright>
           <lastBuildDate>#dateformat(now(), "ddd, dd mmm yyyy")# #timeformat(now(), "HH:mm:ss")# GMT</lastBuildDate>
           <image>
                <title>Blah Blah RSS</title>
                <url>http://www.blahblah.com/logorss.jpg</url>
                <link>http://www.blahblah.com</link>
           </image>
    </cfoutput>
    <cfscript>
    
    function stripHTML(str) {
    str = reReplace(str, "<.*?>","","all");
    //get partial html in front
    str = reReplace(str, "^.*?>","");
    //get partial html at end
    str = reReplace(str, "<.*$","");
    //replace html entities
    str = reReplace(str, "&[\w]*;", "", "all");
    return str;
    }
    </cfscript>
    <cfoutput query="Getjob">
       <item>
             <title><![CDATA[ #title# ]]></title>
    	<pubDate>#dateformat(now(), "ddd, dd mmm yyyy")# #timeformat(now(), "HH:mm:ss")# GMT</pubDate>
             <description>#stripHTML(description)#</description>
             <guid isPermaLink="true">http://www.blahblah.com/career.cfm?jobid=#jobid#</guid>
       </item>
       </cfoutput>
    <cfoutput>
    <atom:link href="http://www.blahblah.com/rss.xml" rel="self" type="application/rss+xml" />
    </channel>
    </rss>
    </cfoutput>
    </cfsavecontent>
    <cffile action="write" file="Z:\\Blah\www.blahblah.com\www\rss.xml" output="#theXml#">
    
    Code (markup):
     
    RedDem0n, Apr 19, 2009 IP
  2. Paul_K

    Paul_K Greenhorn

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Did you get this sorted?
     
    Paul_K, Apr 26, 2009 IP