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 empty_feed

March 02, 2011 2:17am

Subscribe [2]
  • #1 / Mar 02, 2011 2:17am

    Nicolas E

    44 posts

    Hello guys!

    First time we create an RSS feed.

    We have this code in place:

    {preload_replace:master_channel_name="news_articles"}
    {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>
        <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="{master_channel_name}" limit="10" dynamic_start="on" status="Top Story|Featured Top Story|Tip|Demo" track_views="one" disable="member_data|pagination"}
        <item>
          <title><![CDATA[{title}]]></title>
          <link>{title_permalink='{site_url}editions/view'}</link>
          <guid>{title_permalink='{site_url}editions/view'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{summary}{body}]]></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}

    However, empty_feed is always the result.
    Can you tell us what are we doing wrong?

    Best,

    Nicolas E.

  • #2 / Mar 02, 2011 2:31am

    Cheif

    626 posts

    IS your template type set to XML/feed ?

  • #3 / Mar 02, 2011 3:45am

    Nicolas E

    44 posts

    Chief,

    Thanks for your reply.
    No, it was not.
    I set just changed it, but it’s still showing the same result:

    feed://cliente.isa.com.co/index.php/feed/rss

    Best,

    Nicolas E.

  • #4 / Mar 02, 2011 4:39pm

    Ingmar

    29245 posts

    Make sure the EE tag

    {exp:channel:entries channel="news_articles" limit="10" status="Top Story|Featured Top Story|Tip|Demo"}
    {title] 
    
    {/exp:channel:entries}

    actually displays entries. Does it?

  • #5 / Jul 06, 2011 8:58pm

    Nicolas E

    44 posts

    Ingmar,

    Yes the entry works and displays the titles. I’ve created an HTML of it:
    http://proveedor.isa.com.co/index.php/feed

    The Feed is at:
    feed://proveedor.isa.com.co/index.php/feed/rss

    It’s set as RSS Page.

    The actual code is now:

    {preload_replace:master_channel_name="news_articles"}
    {exp:rss:feed channel="{news_articles}" status="Top Story|Featured Top Story|Tip|Demo|Open"}
    
    <?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}{site_name}{/exp:xml_encode}</title>
        <link>{site_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="{master_channel_name}" limit="10" dynamic_start="yes" disable="member_data|pagination" status="Top Story|Featured Top Story|Tip|Demo|Open"}
       <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{title_permalink='{site_url}/editions/view'}</link>
          <guid>{title_permalink='{site_url}/editions/view'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{article_excerpt}]]></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}

    And when in the Template Manager you select “View” we get:

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <rss version="2.0">
    <channel>
    <title>Boletin Proveedor ISA</title>
    <link>http://proveedor.isa.com.co</link>
    <description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>
    ExpressionEngine v2.1.3 <a href="http://expressionengine.com/">http://expressionengine.com/</a>
    </generator>
    <item>
    <title>empty_feed</title>
    <description>empty_feed</description>
    Thu, 07 Jul 2011 01:02:27 GMT</pubDate>
    </item>
    </channel>
    </rss>

     

    Your help is greatly appreciated as this issue is still unresolved.
    Thanks a lot!

    Nicolas E.

  • #6 / Jul 07, 2011 11:34am

    Kyle Cotter

    730 posts

    Hi Nicolas E,

    Let’s see if we can’t get this working.

    Can you change {news_articles} in the second line of the RSS template to {master_channel_name}.

    Also,

    {title_permalink='{site_url}/editions/view'}

    should not contain the {site_url} part.

    Let me know if this helps.

    Thanks!

  • #7 / Jul 07, 2011 7:15pm

    Nicolas E

    44 posts

    Right on Kyle!

    Fixed.
    Thanks a lot!
    Best,

    Nicolas E.

  • #8 / Jul 07, 2011 11:35pm

    Kyle Cotter

    730 posts

    Awesome Nicolas!! 😊

    Let us know if you ever have any more questions.

    Thanks a lot!

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

ExpressionEngine News!

#eecms, #events, #releases