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.

Problem with RSS Feed

January 12, 2011 1:30pm

Subscribe [5]
  • #1 / Jan 12, 2011 1:30pm

    roryrabbitfield

    320 posts

    I have an EE site here:

    http://bit.ly/87iJ0e

    We are having trouble with the RSS feed template. In the footer, click the “News RSS” link to get to the page where you can subscribe to this RSS feed. My client finds that her feed stops working every day or so, and she has to resubscribe to it. We have no idea why.

    We are using EE 1.6.8, build 20091002.

    This is the code from the page where you subscribe to the feed, located here:
    /drblog/rss_2.0/

    {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:%s%Q"}</dc:date>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:weblog:entries weblog="{master_weblog_name}" limit="20" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
        <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{title_permalink=drblog/landing}</link>
          <guid>{title_permalink=drblog/landing}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</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:weblog:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}

    Is the code the problem? The person having trouble with the RSS subscription is using Mac Mail to subscribe.

    Thanks. Rory

  • #2 / Jan 13, 2011 2:38am

    John Henry Donovan

    12339 posts

    Rory,

    The feed looks sound. If the actual feed was disappearing then I would suggest looking at EE.

    What is you client’s definition of not working?

    I am not familiar with Mac Mail. But could it be something as simple as read posts being archived or something similar. So each time she resubscribes it grabs the latest. But then those read items are moved elsewhere.


    I would suggest adding a new post and seeing if that one post appears in her reader

  • #3 / Jan 13, 2011 11:50am

    Mike Mella

    178 posts

    I’ve had trouble with RSS feeds and often it has more to do with the reader than the feed.  Some readers have rules about fetching content, like John suggested. 

    You should subscribe in several different readers and see if you get the same result.  I found that browsers that can handle feeds, like Safari and Opera, allow you to refresh them instantly, while reader services like Google Reader and Netvibes only refresh on their own schedule, so it can be difficult to troubleshoot. 

    I’d say subscribe to the feed using a browser, then make a change to the entries, and then refresh the feed in the browser and see what happens.

  • #4 / Jan 13, 2011 1:53pm

    roryrabbitfield

    320 posts

    John: What should I look at in EE specifically? Other than the code in my RSS template?

    The author did add a new post, and I see it in my reader (mac mail). but maybe every other day or so, the software reports that there is a problem with the feed, the error message says “the feed could not be loaded b/c the content is not a known feed format”. But it can be refreshed and things are back to normal.

  • #5 / Jan 14, 2011 3:38am

    John Henry Donovan

    12339 posts

    Rory,

    I don’t believe EE to be the issue. Your feed validates fine even.

    The author did add a new post, and I see it in my reader (mac mail).

    I see that was tried before I replied. Do you see the error also?

    I did Google your error and a lot comes up. Mainly to do with OS versions.

  • #6 / Jan 14, 2011 10:46am

    roryrabbitfield

    320 posts

    Hi John, Thanks for looking at my feed. Yeah, it does seem likely that the problem is due to the reader and not the feed. I really appreciate your input!

    oh, one last question: This feed doesn’t have an excerpt/summary, just the title and a link. How do I get that in there?

  • #7 / Jan 14, 2011 11:11am

    roryrabbitfield

    320 posts

    I think the consensus about the feed not always showing up is that it is a problem with the reader (mac mail), not the way the feed is written. so at least I have that going for me.

    but, i do have a question about the feed code from a different angle. it’s hard for me to dissect this code since i don’t understand it too well. i used the default code that used to come with EE 1.x. I want to have the body field of the entry to appear in the feed itself, but currently just the title shows up, linked to the page in the actual web site. No body field.

    Here is the site, the link to the RSS feed is in the footer:
    http://bit.ly/87iJ0e

    The code for my full rss feed template is above. I think this line should be bringing in the body & summary?
    <description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</description>

    Thanks!
    Rory


    but they don’t appear at all. I would like an excerpt from the body to appear in the feed listing.

  • #8 / Jan 14, 2011 5:32pm

    Sue Crocker

    26054 posts

    Hi, Rory. Does the channel you’re working with have custom fields called summary and body? What are the fields called?

  • #9 / Jan 14, 2011 5:44pm

    roryrabbitfield

    320 posts

    Oy vey, the field names in my template were wrong. How sad. Thank you so much Sue.

  • #10 / Jan 15, 2011 5:25am

    Ingmar

    29245 posts

    No worries. Glad you found the solution. Post again as needed, please.

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

ExpressionEngine News!

#eecms, #events, #releases