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.

strange RSS template issue

October 14, 2010 10:08pm

Subscribe [2]
  • #1 / Oct 14, 2010 10:08pm

    florian

    395 posts

    Hi, I set up an rss template yesterday to publish the posts from a weblog. Currently I have 4 weblog entries in this weblog. In order for the RSS feed to work, I need to set at least one entry to open. If I set them to one of my custom statuses ‘featured’ or to ‘closed’, I am getting a message saying ‘This feed contains no entries’. I made sure to check in the RSS template that I am including all statuses which I am doing with the following code:

    status="not closed"
    I also tried
    status="Featured|open"

    It doesnt matter what I use in the template, it seems as though at least one entry needs to be set to status in order to show all the posts in the feed. any thoughts on this one?

  • #2 / Oct 15, 2010 10:49am

    Ingmar

    29245 posts

    What version and build of EE are you using? Can you show us a little more of your code?

  • #3 / Oct 15, 2010 10:53am

    florian

    395 posts

    ExpressionEngine v 1.6.9 Build:  20100430

    this is the RSS template

    {assign_variable:master_weblog_name="blog"}
    {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>{exp:xml_encode}{weblog_name}{/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:%Q"}</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:weblog:entries weblog="{master_weblog_name}" limit="10" rdf="off" dynamic_start="on" status="not closed" disable="member_data|trackbacks"}
    <item>
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
    <link>{title_permalink=blog/article}</link>
    <guid>{title_permalink=blog/article}</guid>
    <description>
    <![CDATA[
    {content_preview}{content}
    <hr >
    Categories: {categories}<a href="http://{site_url}/blog/category/{category_url_title}/">{category_name}</a>{/categories}
    <a href="http://api.tweetmeme.com/share?url={site_url}blog/post/{url_title}">http://api.tweetmeme.com/imagebutton.gif?url={site_url}blog/post/{url_title}</a>
    ]]>
    </description>
    <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i%Q"}</dc:date>
    </item>
    {/exp:weblog:entries}
        
    </channel>
    </rss>
    
    {/exp:rss:feed}

    I know for a fact that the weblog short name is blog. and I know for a fact that these entries display in the front end of the web site with the same short name and the same custom fields.

    I have the following in the <head>

    <link rel="alternate" type="application/rss+xml" title="RSS" href="{site_url}site/rss_2.0">
  • #4 / Oct 15, 2010 11:01am

    Ingmar

    29245 posts

    Have you tried a status= parameter for {exp:rss:feed}?

  • #5 / Oct 15, 2010 11:09am

    florian

    395 posts

    that was it.

    so from this, I learned that you need to set the status in the {exp:rss:feed} tag, not the weblog entries tag.

    thanks ingmar

  • #6 / Oct 15, 2010 11:11am

    Ingmar

    29245 posts

    I would suppose both, actually. Glad to see that helped, please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases