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 Shows Only 1 Entry

November 29, 2010 7:17pm

Subscribe [5]
  • #1 / Nov 29, 2010 7:17pm

    AdamBaney

    65 posts

    My RSS feed shows only 1 entry in my feed reader (Apple Mail). I’m using EE 2.1.0, Build 20100810. How do I get the feed to show multiple (20) entries?

    Here’s my RSS feed code:

    {exp:rss:feed channel="events" show_expired="no" show_future_entries="yes" rdf="off" dynamic_start="no" orderby="date"}
    
    <?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>{exp:xml_encode}{channel_name}{/exp:xml_encode}</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="events" limit="20" sort="asc" show_expired="no" show_future_entries="yes" rdf="off" dynamic_start="no" orderby="date"}
        <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{channel_url}</link>
          <guid>{channel_url}</guid>
          <description><![CDATA[{if events_description}{events_description}{/if}{if events_time}<strong>Time:</strong>  {events_time}{/if}{if events_location}<strong>Location:</strong>  {events_location}
    ]]></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:channel:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}

    Thanks!

  • #2 / Nov 29, 2010 7:47pm

    kellypacker

    138 posts

    This might not be affecting it, but the {exp:rss:feed} does not take all the parameters you are listing. orderby, rdf and dynamic_start aren’t rss tag parameters. I’m pretty sure they just fall silent, but just to clean it up a bit. http://ellislab.com/expressionengine/user-guide/modules/rss/index.html

    Change dynamic_start to “on”?

  • #3 / Nov 29, 2010 8:48pm

    AdamBaney

    65 posts

    When “dynamic_start” is set to “yes”, “This is used to allow EE to serve only new content when it is requested by the feed via a RFC3229-compliant request (RFC3229 info).” [Source: http://ellislab.com/expressionengine/user-guide/modules/channel/parameters.html#par_dynamic_start ]. Does this mean that only the most recent entry will be shown?

    Setting “dynamic_start=yes” doesn’t do anything.

    When I take away the parameters in the {exp:rss:feed}, the feed completely stops working. The only way to keep the feed working is to leave those parameters in, e.g. {exp:rss:feed channel="events" show_expired="no" show_future_entries="yes"}... yes, strange.

    Thank you for your help, Kelly!

  • #4 / Nov 29, 2010 10:54pm

    cherrypj

    158 posts

    You should keep the following parameters:

    {exp:rss:feed channel="events" show_expired="no" show_future_entries="yes"}

    Kelly was pointing out that orderby, rdf and dynamic_start are not supported by the RSS tag, so you don’t need them.

    You might have some invalid code in your sample (the paragraphs inside the description, for example, throw a red flag for me). XML will fail pretty easily if there’s any hint of invalid code. Start with this sample RSS feed and see what you get.

    Can you point us to your RSS feed?

  • #5 / Nov 30, 2010 7:29am

    Sue Crocker

    26054 posts

    Thanks for the assist, Michael and Kelly.

    Adam, working with the sample RSS feed is the way to start out. What happens if you try using that? If you have a stand alone template with the following code in it, do you get 20 entries?

    {exp:channel:entries channel="events" show_future_entries="yes" show_expired="no" limit="20"}
    {count}. {title}
    {/exp:channel:entries}
  • #6 / Nov 30, 2010 12:29pm

    AdamBaney

    65 posts

    Thanks, Michael. The RSS “example” feed is:

    http://faithbibleabq.org/events/rss_example/

    What’s strange is that the feed now says “empty_feed”. I replaced “default_site” with the “events” channel:

    {preload_replace:master_channel_name="default_site"}

    changed to

    {preload_replace:master_channel_name="events"}


    Thank you also, Sue. I do get 20 entries using the code you supplied:

    http://faithbibleabq.org/events/entry-list/

  • #7 / Nov 30, 2010 2:36pm

    cherrypj

    158 posts

    Try the following (basically, wrap Sue’s channel tag with the sample RSS tag):

    {preload_replace:master_channel_name="default_site"}
    {exp:rss:feed channel="{master_channel_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><![CDATA[{channel_name}]]></title>
      <link>{channel_url}</link>
      <description>{channel_description}</description>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:channel:entries channel="events" show_future_entries="yes" show_expired="no" limit="20"}
    <item>{count}. {title}</item>
    {/exp:channel:entries}  
        
      </channel>
    </rss>
    
    {/exp:rss:feed}

    I suspect it’s the dynamic_start=“on” parameter.

  • #8 / Nov 30, 2010 3:54pm

    AdamBaney

    65 posts

    Thanks, Michael. I did as you instructed. I modified Sue’s code and turned the template into an RSS template. The RSS feed states, “empty_feed”. The only difference in my code and the code that you supplied is that I changed “default_site” to “events” (at the very top).

    http://faithbibleabq.org/events/entry-list

    {preload_replace:master_channel_name="events"}
    {exp:rss:feed channel="{master_channel_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><![CDATA[{channel_name}]]></title>
      <link>{channel_url}</link>
      <description>{channel_description}</description>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:channel:entries channel="events" show_future_entries="yes" show_expired="no" limit="20"}
    <item>{count}. {title}</item>
    {/exp:channel:entries}  
        
      </channel>
    </rss>
    
    {/exp:rss:feed}
  • #9 / Nov 30, 2010 4:09pm

    cherrypj

    158 posts

    Since I’m not seeing the count and title, you’re not quite using the same code. Try this:

    {exp:rss:feed channel="events"}
    
    <?xml version="1.0" encoding="{encoding}"?>
    <rss version="2.0">
    
      <channel>
    
        <title><![CDATA[{channel_name}]]></title>
        <link>{channel_url}</link>
        <description>{channel_description}</description>
        <docs>http://www.rssboard.org/rss-specification</docs>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:channel:entries channel="events" show_future_entries="yes" show_expired="no" limit="20"}
    <item>{count}. {title}</item>
    {/exp:channel:entries}  
        
      </channel>
    </rss>
    {/exp:rss:feed}
  • #10 / Nov 30, 2010 4:19pm

    AdamBaney

    65 posts

    I found the right code that works… even with the < p > tags. I can now see 10 “events” entries in the feed. I have marked notes where I noticed the differences between my original feed and the new feed code (which you, Michael, supplied) below:

    {exp:rss:feed channel="events" show_expired="no" show_future_entries="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>
        
    <!-- NOTE:  "[CDATA[]]" code was not in original feed for <title> -->
    
        <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="events" limit="10" dynamic_start="on" disable="member_data|pagination" sort="asc" show_expired="no" show_future_entries="yes"}
        <item>
    
    <!-- NOTE:  "[CDATA[]]" code was not in original feed for <title> -->
    
          <title><![CDATA[{title}]]></title>
          <link>{title_permalink='events'}</link>
    
    <!-- NOTE:  <guid> was not even included in original feed -->
    
          <guid>{title_permalink='events'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{if events_description}{events_description}{/if}{if events_time}<strong>Time:</strong>  {events_time}{/if}{if events_location}<strong>Location:</strong>  {events_location}
    ]]></description>
          <dc:subject><![CDATA[{categories backspace="1"}{category_name}, {/categories}]]></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}

    The final, working feed:  http://faithbibleabq.org/events/rss


    Thank you so much, Michael! I really appreciate your help with my RSS feed! 😊

    Thank you also, Sue and Kelly, for your help. 😊

  • #11 / Nov 30, 2010 4:22pm

    cherrypj

    158 posts

    That sample RSS feed really did lead the way, eh. Really glad you got that sorted.

  • #12 / Dec 01, 2010 3:07am

    John Henry Donovan

    12339 posts

    Thanks for the help Michael. Glad you are up and running again Adam. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases