Support » Fixing WordPress » RSS Widget not working since 2.7

  • One of my readers noticed that my RSS widget in the sidebar is no longer updating. I can’t find any setting that should have changed. Any ideas?

    Using 2.7.1 and I’m not sure whether it broke after 2.7 or 2.7.1

Viewing 11 replies - 1 through 11 (of 11 total)
  • Okay….

    I’ve played around with this a little more. I tried the KB advanced rss widget and it has the same issue, the feed stops as of when I updated the blog to 2.7. This leads me to believe it’s in the source of the rss feed – also a blog of mine.

    I know the feed is showing up fine in google reader but I don’t know enough about rss to guess why it won’t show new posts in the widget. Any ideas?

    I’ve had this experience as well and its very frustrating. One one of my sites I was able to jumpstart it by completely removing the two rows relevant to that feed from the wp_options table in the db. One for the actual feed content and one for the timer that would tell it when to update. Eventually I was able to reinstall that feed as a widget and get it working, but messing with the DB is a terrible way to solve a problem like this and I encountered a ton of bugs in the process (as well as having to change some css that was targeting the hash for the original feed).

    I’ll try and post here if I find a better solution.

    Okay, so this isn’t a very elegant solution, but its fairly simple and I can’t think of anything that would break by trying it.

    I tracked my particular problem down to the /wp-includes/rss.php file, which has all the functions that control the fetching and caching of rss files (wordpress only checks the actual feed once per hour, to avoid it slowing down all your pageloads).

    At least in my case (your problem might be different) wordpress knew that the copy it had cached was too old and needed to be updated, but when it checked the feed (in this case it was a twitter rss feed) it was for some reason only getting 502 error responses (and a fail whale page instead of an RSS feed). It turns out that it was sending some information from the cached feed (the last modified date and ‘if-none-match’) along with the request for the new one that was breaking the response. By just commenting out the two lines that did that and loading the blog once I made it update, then i just restored the original code. Hopefully this was just a fluke of some kind related to updating. I’m not totally sure if its going to have more problems updating in the future, I need to wait and see. But for now here is the exact changes I made.

    Like i said, I don’t think that any harm can come from trying this edit, but be VERY careful! Editing core files is always dangerous, even if the change isn’t, and you should restore the way the files originally were when you are done.

    So in wp-includes/rss.php find line 462, you should see this:

    if ( isset($rss->etag) and $rss->last_modified ) {
    	$request_headers['If-None-Match'] = $rss->etag;
    	$request_headers['If-Last-Modified'] = $rss->last_modified;

    What you want to do is “comment out” (add // before, so its inactive) the two lines starting with $request_headers. So it looks like this:

    if ( isset($rss->etag) and $rss->last_modified ) {
    //	$request_headers['If-None-Match'] = $rss->etag;
    //	$request_headers['If-Last-Modified'] = $rss->last_modified;

    Now try reloading your blog (try a few differen’t pages and maybe empty your cache if you run supercache or something). Hopefully this fixes your problem. Either way remember to remove the // from teh lines and leave teh file like you found it.

    Good luck 🙂

    Okay, so here’s another unrelated potential solution. It solved a problem I was having that didn’t involve the RSS widget, but was using the same underlying RSS code that the widget uses. A feed (RSS from another WP blog) wasn’t updating and when i looked at the response code it was 301, permanent redirect.

    The solution: add a / at the end of the url. I was pointing to, and when i changed it to it started working again.

    It seems like a bug or something but either way, if you’re having problems aggregating from another WP site make sure there’s a slash at the end.

    Thanks for the possible workarounds. I’d pretty much given up on getting the rss feed to work but I will try your ideas.

    The Incidental Economist


    I’ve just started using the WP RSS widget and I’m not sure if it is updating correctly.

    I can always force an RSS update through the WP RSS widget by disabling the URL (like deleting it) then saving and then put it back again and saving.

    Actually, the insertion of a “/” at the end of the feed URL that jeremyclarke suggested above also disables the feed. It doesn’t help it at all.

    What I have not yet seen, after many hours, is WP succeeding at an update by itself.

    I’ve read it should take an hour or so. How long should I wait before concluding something is broken? I’ve validated my feed and I know it is OK.

    My site is




    the widget only checks feeds every 12 hours.

    add this:

    add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 1800;') );

    to your current theme’s function.php and it will check it every 30 minutes.

    Hmm, it’s all very weird. I had this problem too, and I tried to change the feed URL from “rss2” to “atom”. That worked. After a while, that didn’t work any more, and I changed it back to “rss”.

    Maybe anyone sees the culprit after this addition?





    i tried to add the code as is to the function php…
    where should it be added in?

    Open your functions.php file
    Scroll down and pase the code one line above ?>

    John25’s last suggestion worked perfectly for me.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘RSS Widget not working since 2.7’ is closed to new replies.