ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

RSS feed issues

August 14, 2011 8:40am

Subscribe [4]
  • #1 / Aug 14, 2011 8:40am

    RedLeader

    33 posts

    Hi!  I’m trying to create an RSS feed.  It’s my first attempt and I don’t think I’m trying anything complicated but it’s not working.  I copied and pasted the example from the user guide and altered a few variable names to match my News channel.

    In an effort to find out what was going on you’ll notice I’ve turned debug on (it didn’t seem to do anything) and dynamic_start off (again, no change).

    Here’s my code:

    {exp:rss:feed channel="news" debug="yes"}
    <?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><![CDATA[{channel_name}]]></title>
        <link>{channel_url}</link>
        <description>{channel_description}</description>
        <dc:language>{channel_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>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:channel:entries channel="news" limit="10" dynamic_start="off" disable="member_data|pagination"}
        <item>
          <title><![CDATA[{title}]]></title>
          <link>{title_permalink='site/index'}</link>
          <guid>{title_permalink='site/index'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{news_summary}]]></description>
          <dc:subject><![CDATA[Subject! Hello!]]></dc:subject>
          <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
        </item>
    {/exp:channel:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}

    And here’s what it output:

    <ee:last_update>1313319187</ee:last_update>
    
    <?xml version="1.0" encoding="utf-8"?>
    <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><![CDATA[News]]></title>
        <link>http://mysite.local/</link>
        <description></description>
        <dc:language>en</dc:language>
    
        <dc:creator>[email protected]</dc:creator>
        <dc:rights>Copyright 2011</dc:rights>
        <dc:date>2011-07-21T11:12:06+00:00</dc:date>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    
        
        </channel>
    </rss>

    Why is there no news items being output?  There are plenty of “open” news items on the site.

    SIDE QUESTION:
    Going to the feed in Firefox does not trigger the usual “Subscribe t this feed with google reader” thing that normal, well formatted RSS feeds normally trigger.  Is there something wrong with the EE RSS feed generator?

    What does this bit mean?

    <ee:last_update>1313319187</ee:last_update>

    Is it to do with dynamic_start=“yes”?  Because it’s still there even when I turn that off.  Is it breaking my feed?

    Thanks!

  • #2 / Aug 15, 2011 2:53am

    John Henry Donovan

    12339 posts

    RedLeader,

    What version and build of EE are you using?

    Is your template set to RSS type?

    Let see if we can generate your entry output normally.
    Go ahead and create a new regular blank template and in it add the following and nothing else.

    {exp:channel:entries channel="news" limit="10" dynamic="no" disable="member_data|pagination" status="not closed"}
      <h2>{title}</h2>
    <p>   {news_summary<br />
    {/exp:channel:entries}

    Does that generate 10 news items for you?
    Do you have custom statuses for that channel?

    What version and build of EE are you using?
    Are you using any add-ons?

  • #3 / Oct 11, 2011 7:00am

    gelviis

    55 posts

    Hi there,

    I’ve had the same issues (and more). Through reading the forums I’ve got a valid W3C feed working. I’ve updated the wiki accordingly: http://expressionengine.com/wiki/RSS_Template_for_EE2

    Thanks,

    Gregor

  • #4 / Oct 11, 2011 11:28am

    Mark Bowen

    12637 posts

    Hi RedLeader,

    Just a quick catchup to see if you ever got this sorted and if you had tried out any of the items mentioned by John or Gregor here?

    Thanks,

    Mark

    P.S. Thanks for the help there Gregor!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases