… and why some WordPress Moderators are idiots
Today I got an email asking me to enable full text RSS feeds - so far so good, only when I activated the “Full Text” option nothing changed - neither in FireFox, nor in Google Reader, nor anywhere else. Only in Feed Proxy I saw a tag appear that contained the full text (including html tags), but the description still only contained the excerpt (without html tags).
Before I link you to the thread that made me conclude the statement in the post title, let me quote from the RSS 2.0 specs:
A channel may contain any number of items. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. **An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see [examples](http://cyber.law.harvard.edu/rss/encodingDescriptions.html)), and the link and title may be omitted.** All elements of an item are optional, however at least one of title or description must be present.
That said take a look at http://wordpress.org/support/topic/190901 - having the problem described above and reading the replies, it just left me with one question:
If Otto42 is a moderator, where does WordPress get its trolls from?
The RSS Specs are pretty unspecific and blurry when it comes to the issue, one can at most point to http://www.feedvalidator.org/docs/warning/DuplicateDescriptionSemantics.html, but the main issue I have is that the rants of this “moderator” won’t help me fix my problem, because Google Reader and FireFox still don’t display the full entries.
A fix for it
If you want to fix it, you can do the following (in WP 2.7):
Open up wp-includes/feed-rss2.php
and change
<?php if (get_option('rss_use_excerpt')) : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
<content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>
<?php else : ?>
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
<?php endif; ?>
<?php endif; ?>
to
<?php if (get_option('rss_use_excerpt')) : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_content() ?>]]></description>
<?php endif; ?>
Similarly, if you want to fix your comments, too, open wp-includes/feed-rss2-comments.php
and change
<?php if ( post_password_required($comment_post) ) : ?>
<description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description>
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
<?php else : // post pass ?>
<description><?php comment_text_rss() ?></description>
<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
<?php endif; // post pass
to
<?php if ( post_password_required($comment_post) ) : ?>
<description><![CDATA[<?php echo get_the_password_form() ?>]]></description>
<?php else : // post pass ?>
<description><![CDATA[<?php comment_text() ?>]]></description>
<?php endif; // post pass