Support » Fixing WordPress » Comments RSS feeds empty

  • I’ve been struggling to understand what’s going on with that for a day now. Looking through the code, and searching the support pages here. Finally it hit me when I found a year old topic on a isimilar problem that was claimed to be fixed.

    So, the problem is that Comments RSS 2.0 feed show up as if there are no comments there. So I see the correct header with a few lines between <channel></channel>, the last of which is <generator> statement. No <item> statements (which are the actual comments) are present.

    The comments of course are there. Moreover, I add few more just to make a bunch of them. It does not help, the system ignores the comments, and does not give the comments feed.

    Comments RSS feed for all comments works just fine, as well as Entries RSS feed. It’s just Comments RSS feed for a specific entry (post) does not work at all. That really had driven me crazy.

    Now, after reading that year old topic I did the following: I clicked the ‘Edit’ link on my entry, and without doing anything there hit “Save’. That was all the system needed to give me the Comments RSS feed for that entry back. I’ve became a happy user of the feed.

    The entry was couple of weeks old, and I’ve started to play with the feeds just now, adding new comments to those entries that were still open for comments/trackbacks/pingbacks.

    So it appears that there is still a bug in WP 1.5.2 regarding Comments RSS feed for specific entry that is related to some timestamps. In particular, it appears there is someting like “last modification” timestamp that god updated when I re-saved my entry.

    You can try add comments to other entries on my test blog setup at test blog. Entries “test 11” and “test 12” are those I’ve been playing with. Entries with lower numbers should do fine for the purposes of this test.

    Does anyone knows of this problem? Is a fix in the works? Is is there something I don’t understand here and this is the way it’s supposed to work?

    I would appreciate a clear explanation. Thank you.

Viewing 15 replies - 1 through 15 (of 15 total)
  • You go on a bit too long in your post. I see comments on this post:
    In fact, in all posts with comments, they show up just fine.

    Sorry for being too long. All posts with comments are fine indeed as they were “contaminated” with my test already, and I’d used the “entry update” trick on them. I specifically mentioned that topics “test 12” ‘and “test 11” had been used for that already. You link points to one of those two.

    I would like to find a fix to this.

    Additional evidence to this problem is that for entries where the feed does not work – the feed is malformed as can be seen here: Malformed feed. While there are no comments, the feed is missing the WP version here: <generator></generator&gt;

    I’ve seen the same in some cases until I realized I need to do an extra “Save” of the entry to make comments feed work (see above). The problem was that the comments feed seemed to work, but all links to comments were shown without the comment number, something like

    So, obviously there is a bug in WP related to comments RSS feeds.

    Here it is again. Just made a new post. Then made a new comment. The comments feed is not working, and whatever you see in the feed is malformed. Here is the post.

    The feed looks as follows:

    <!-- generator="wordpress/" -->
    <rss version="2.0">
    <title>Comments on: Test posting from Flock</title>
    <pubDate>Fri, 21 Oct 2005 07:37:31 +0000</pubDate>

    Anyhow, it appears to me that nobody is interested anyway… I guess I am disappointed with the support.

    Ok, I am going to ask a very simple question here:

    Does anyone of WordPress support care that there is a Comments RSS feed bug that does let any comments feeds out?

    So far all I see is that nobody cares. So much for WordPress support.

    Moderator James Huff


    Volunteer Moderator 🚀

    1. Actually, we do care, until you post things like “So much for WordPress support.”

    2. The forums are no for bug submissions. We are community volunteers, not developers. We can’t fix bugs for you. You need to submit your bug reports through the proper channels:

    3. Your blog is currently full of errors that may or may not be related to this problem. I suggest that you open a new thread and focus on fixing those first.

    4. You’re the first person to report something like this, and all of the comments feeds that I subscribe to are working fine. So, this is probably not a “bug”.

    5. Have you tried replacing WordPress’ feed files? Your feed problem looks more like a corrupt feed generation file, rather than a “bug”. Perhaps you editing something that you should not have touched?

    macmanx: Thanks for you response. Hope we could chat a little on this, couldn’t we? I would appreciate that.

    1. As much I don’t like posting things like that, I did not see other choice than posting just these words. 🙁

    2. Understood.

    3. I turned reporting of all errors on at wp/wp-settings.php:52 That is, error_reporting(E_ALL); instead of error_reporting(E_ALL ^ E_NOTICE); I feel you pain seeing all those errors, but those are regular errors from regular WordPress 1.5.2 installation. I was amazed when I saw all that myself.

    4. I can’t say I agree with you rationale, but yes, I understand that it might be the reason that nobody really care to look into it.

    5. No I didn’t. And I am careful NOT do modify core files.

    And, finally:

    6. When I turned those debug messages on, it spotted $wp_version and $id undefined. Adding a global $wp_version, $id; at the beginning of wp/wp-commentsrss2.php seem to have fixed the Comments RSS feeds, at least for the time being. Yet I still can’t pinpoint the real culprit of this, as all relevant files seem to be included and executed. And my fix could be just wrong.

    Still not seeing what is wrong, even on the latest “malformed” post link I can get a valid feed that says:

    Comment on Test posting from Flock by: Aleksey BaulinFri, 21 Oct @ 01:32

    Comment it of course

    And the comment link in the rss is:

    This feed is valid, but may cause problems for some users. We recommend fixing these problems.

    Your feed appears to be encoded as “UTF-8”, but your server is reporting “koi8-r”

    Moderator James Huff


    Volunteer Moderator 🚀

    When I turned those debug messages on, it spotted $wp_version and $id undefined. Adding a global $wp_version, $id; at the beginning of wp/wp-commentsrss2.php seem to have fixed the Comments RSS feeds, at least for the time being. Yet I still can’t pinpoint the real culprit of this, as all relevant files seem to be included and executed. And my fix could be just wrong.

    Those should be defined in a default WordPress install. At least, they are in every WordPress blog that I have installed. Is there a version.php file in your /wp-includes/ directory?

    Beel: Yes, you came in when I “fixed” it. So it worked for me as well. macmanx came in while I was in the procees of seeing what’s wrong so he saw a bunch of errors.

    Now, I removed the “fix”, and in continued to work. It still does, for those older topics. I made a new post, and added two comments. My feed for those comments does not give me anything, although now it’s not malformed either. Could you tell me whether you can get the feed for those new comments in the new post? Thanks.

    macmanx: sure, there is. global statement just made it available, it did not assign a value to the variable. And, as I noted in the message I just posted, misteriously is does work for those post now even though I put the original file back (without the “fix”).

    Here is a tricky question: Is is true, that the post/comment date/time in the database is set according to the “weblog time” in the “General Options” setting?

    So it happens, that if you set the “weblog time” according to your physical location, and your server’s actual location is in a different time zone, especially in a zone where your local time is yet to come, then all feed requests are going to fail until that time comes as they are limited by current (read server’s) time. This happens, for instance, when you local time zone is EST, while you server is in PDT time zone.

    Is it true that there is no GMT/weblog/server times conversions when retrieving the comments for the purpose of giving a feed? That’s what it appears to me now looking at the SQL commands in wp-commentsrss2.php.

    Thank you.

    Moderator James Huff


    Volunteer Moderator 🚀

    All comments and posts are stored in the database with a GMT date and time.

    That is not true. Specifically, for comments there are both “weblog time” and GMT time. The corresponding fields in the ‘comments’ table are: ‘comment_date’ for “weblog time” and ‘comment_date_gmt’ for GMT time.

    The code in wp-commentsrss2.php prints the publication date/time as GMT time on line 37: <pubDate><?php echo gmdate('r'); ?></pubDate>. However when making a the database select, it selects the posts by the “weblog time”. So here is the fix to wp-commentsrss2.php:

    < AND post_date < '".date("Y-m-d H:i:59")."'
    < ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
    > AND comment_date_gmt < '".gmdate("Y-m-d H:i:59")."'
    > ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
    < AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'
    < ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
    > AND $wpdb->comments.comment_approved = '1' AND comment_date_gmt < '".gmdate("Y-m-d H:i:s")."'
    > ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );

    Moderator James Huff


    Volunteer Moderator 🚀

    Please submit your bug report and fix to the proper channels:

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Comments RSS feeds empty’ is closed to new replies.