WordPress.org

Support

Support » Requests and Feedback » Incorrect generation of RSS feeds

Incorrect generation of RSS feeds

  • There seems to be a bug in the generation of the RSS 2 feed that prevents it from being completely valid — feedvalidator.org complains about “undefined description elements” in the description node of an item entry; namely HTML tags.
    I think the description node is supposed to be just text/plain, meaning it needs to be wrapped in a CDATA tag for it to be valid. WordPress 1.2.2 doesn’t do this.
    It’s easy enough to fix in my own WP installation, but it would be helpful if it’s fixed in WP proper as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    @macmanx

    Support Team Rep.

    It’s working just fine in everyone else’s install, just validate mine, it’s fine. For you, I would say delete wp-rss2.php and wp-feed.php off of your server (this is a critical step, do it). Download WP again (this is also a critical step, do it). And, upload a fresh wp-rss2.php and wp-feed.php from your new download. You will probably have to make a new post to see any changes, but that should do the trick.

    The files uploaded to my server match the checksum of those in the WP 1.2.2 zip file. Re-downloading would accomplish nothing.
    WP simply generates incorrect RSS.
    Yours is validating because you only have a summary in your RSS.

    Moderator James Huff

    @macmanx

    Support Team Rep.

    Just try replacing the files. Like I said before, you’re the only one with this problem.

    The MD5 sums straight from the zip matched, but I replaced anyway. No deal.

    I think it might because some plugins are used the following lines in wp-rss2.php fails :
    <?php if (get_settings(‘rss_use_excerpt’)) : ?>
    <description><![CDATA[<?php the_excerpt_rss(get_settings(‘rss_excerpt_length’), 2) ?>]]</description>
    <?php else : ?>
    <description><![CDATA[<?php the_excerpt_rss(get_settings(‘rss_excerpt_length’), 2) ?>]]</description>
    <content:encoded><![CDATA[<?php the_content(”, 0, ”) ?>]]></content:encoded>
    <?php endif; ?>
    I added the CDATA in for both of the description tags

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Incorrect generation of RSS feeds’ is closed to new replies.