Compatability bugs and possible quick fixes for issues with FeedWordPress after upgrading to WordPress 2.5(posted on 18 April 2008)

WordPress 2.5 was recently released, and as a result many FeedWordPress users have upgraded their blogs to the latest version of WordPress. I am currently in the process of testing for any compatability issues between WordPress 2.5 and the development version of FeedWordPress (0.993a); if I notice any definite problems, then I will make them high-priority bug fixes and try to push out the release of 0.993 as quickly as possible. (That probably means either tonight, or some time around the end of the month, depending on when I find any problems that I may find.) If you have tried using FeedWordPress with WordPress 2.5, either in version 0.992 or in the current trunk development version, and have noticed any problems since the upgrade that aren’t fixed by what I’m about to suggest, then please feel free to report them in the comments here or to me by e-mail, as you prefer. The most helpful bug reports are those that state, in as much detail as possible, (1) what precisely is going wrong, (2) under what conditions, (3) with what version of FeedWordPress, (4) under what version of PHP, and, if the problem is with syndicating posts, then (5) with which feeds at which specific URIs. If you are getting symptoms of a fatal error (either a printed error message or a blank screen where a page should be), then you can also help me out a lot by copying and pasting the contents of the error message into your report, or, if you have a blank screen, checking the bottom of your web server’s error logs to see if there is a PHP error report down there, and, if so, copying and pasting that.

That said, one of the most common sources of error reports when new versions of WordPress are released come not from a real compatability issue, but rather from the fact that, if you’re not careful, upgrading your copy of WordPress will downgrade your copy of MagpieRSS from the newer version shipped with FWP to the very old and busted version that WordPress continues, for whatever reason, to ship with new releases of WordPress.

Diagnosis

Here are the most common symptoms of this problem:

  • Some feeds (notably, feeds produced by Blogger and other Atom 1.0 feeds) stop syndicating post contents. You get the headline of the post and nothing else.
  • Some feeds (notably, those produced by blogs hosted at WordPress.com (!)) start appearing with just the capital letter A as the content of the post.
  • Categories stop being properly syndicated. Everything is placed in Uncategorized or in bizarre, mashed-up categories (only one per post) that seem to contain several category names.
  • Podcast attachments are no longer syndicated.

And so on, and so forth. If you notice these problems with your feeds just after you’ve upgraded your copy of WordPress, it’s probably because you need to re-install the MagpieRSS upgrade.

Cure

Here’s how you do that. In the FeedWordPress plugin directory (wp-content/plugins/feedwordpress/, relative to your WordPress installation), there is a directory called MagpieRSS-upgrade, which contains, or at least at one point contained, two files, rss.php and rss-functions.php. If you still have these files, you need to copy them to your WordPress wp-includes directory, where they will overwrite the older version of MagpieRSS that ships with WordPress. If you do not (because, for example, you moved them rather than copying them when you first installed FeedWordPress), then you can get new copies of these files by downloading the latest version of FeedWordPress, and extracting these two files from the archive.

Etiology and pognosis for the patient

The reason that this happens is that every installation of WordPress includes a very old version of MagpieRSS, the library that FeedWordPress uses to parse the feeds that it syndicates. As of the 2.5 release, WordPress still ships with a package derived from MagpieRSS 0.51, which is the same version it shipped with when I started work on FeedWordPress three years ago. This version of MagpieRSS is adequate for what WordPress needs it to do (basically, fetch headlines for the Dashboard from a select few feeds), but it was already outdated three years ago, and it is especially outdated now–it could not handle multiple categories; it could not handle enclosures, it could not translate feeds in alternate encodings; and, importantly, it cannot correctly handle Atom 1.0 feeds (now the default for Blogger feeds) or feeds with MediaRSS extensions (now the default for WordPress.com feeds). Unfortunately, since there is a version of MagpieRSS, which is loaded every time you load WordPress, it is hard to drop in a newer version which can do these things without causing errors from the collision in function and class names.

The solution I settled on was the bundled MagpieRSS upgrades, which in the past I sometimes described as optional, but which now really are mandatory if you hope to do any serious syndication in the modern environment. Users can avoid collisions by copying the upgrade so that it just overwrites the older version in wp-includes. Problem solved for the time being.

But the downside of this solution is that every time an upgrade of WordPress comes out, it comes out with older versions of the MagpieRSS package included, and when you overwrite all the files in wp-includes with the newer files from the WordPress release, one of the things you overwrite is your upgraded copy of rss.php. Meaning that, unless you remember to re-upgrade MagpieRSS every time you upgrade WordPress (something which is easy enough to forget), it breaks your syndication until you remember, or I remind you, to re-do the upgrade.

I frankly consider this a design flaw in FeedWordPress, but it’s not a flaw that is easy for me to fix. I am considering different ways of getting around it, and honestly the most likely solution at this point is probably simply to abandon MagpieRSS and package another feed parsing package (such as SimplePie) in the feedwordpress plugin directory, where upgrades to the WordPress core code cannot interfere with it. But doing that will involve pretty dramatically refactoring some of FeedWordPress’s internal workings, and that may take a while. In the meantime, if you have a working aggregator, you should probably apply this quick fix and see how many of your problems it solves.

Replies to Compatability bugs and possible quick fixes for issues with FeedWordPress after upgrading to WordPress 2.5 (21 so far…) Syndication feed

  1. Scott White replied:

    This worked PERFECTLY for me!!! Thank you!

  2. Jeremy Weiland replied:

    Thanks so much for the detailed analysis. That is ridiculous that WP 2.5 still uses an outdated version of something as basic and important as an RSS parser.

    There may be another downside of switching out the rss files - looks like on some of my sites, sidebar widgets that syndicate feeds are breaking. I’ll keep you posted, but thanks so much for the tips. Sometimes all we need is just a little pointing in the right direction.

    I consider this a design flaw in WordPress, not in FeedWordPress. This and the flash uploading debacle makes 2.5 a pretty lame release IMHO.

  3. blogHarrisburg Fixed - Really : floor9.com:

    […] and started bH over from scratch.  I chose to wait and see if a fix was posted.  And yesterday, one was.  As seems to always be the case, the solution was mind-boggingly simple and required […]

  4. Rad Geek replied:

    Jeremy,

    Well, to be fair, the WordPress team doesn’t have any real reason to need a more advanced version of MagpieRSS than the one that they ship, and since the version they ship is significantly modified from an off-the-shelf Magpie (so as to fit everything in one file, and so as to use the WordPress database, rather than the native file system, for caching), I can understand their reluctance to replicate the process with a newer version for something that’s so little used.

    The problem it causes for me isn’t really inherent in the fact that the old version (which is adequate to their own needs) is there, but rather that there is no way for me to bring in the newer version without either (a) simply replacing the old include files with my new files which creates this problem, or else (b) causing a fatal error from a namespace collision. But that’s really a problem with PHP itself, more than with WordPress per se, due to the lack of any mechanism for namespacing or for dynamically overriding an existing class definition. I don’t blame the WordPress devs for not setting things up so as to accommodate my syndication plugin; unfortunately, design choices in PHP itself just make it so that the damage takes more routing around than I would like.

  5. Scott White replied:

    Well I agree with Jeremy. It’s not your design flaw it’s WP’s. Whether they need to use an updated version or not.

    After I upgraded to 2.5, a lot of things “broke” on several of my blogs.

    And the “media manager” is hosed. I have been looking at several different platforms for my blogs besides WP.

    Of course, the best aggregate out there is this one so that particular blog isn’t going anywhere but then I don’t use any of the WordPress “features” so to speak.

    When I read your explanation of the problem for my blog I did the head slap. I had forgotten all about the MagPieRSS replacement during the installation of FeedWordPress.

    Anyway, my aggregate is working fine now, just waiting for WP to fix their buggy release.

  6. ErikC replied:

    I’m not sure this fix fixed my problem.

    I am still getting a bunch of ‘uncategorized’ feeds, and I have set unfamiliar categories to not syndicate unless there is one familiar category.

    I have replaced rss.php and rss-functions.php inside the wp-includes directory. Please let me know what to do.

  7. omg replied:

    Very nice plugin, thx! I do not find the 2.5 quick fix, where I can download it?

  8. Sherief replied:

    I have been using feedwordpress for about a year for my high school alumni website and this is a GREAT plugin.

    Just want to inform you that I made some changes on your code to accomodate Multiply RSS or any other RSS that has no “link” tag, but using “guid permalink”.

    What I changed are, … after items[0]; ?> on line 680, I add,

    … on function SyndicatedPost(), after comment, // In case you want to know the external permalink…, I changed into something like this, if(!empty($this->item[’link’])) $this->post[’meta’][’syndicationpermalink’] = $this->item[’link’]; else $this->post[’meta’][’syndicationpermalink’] = $this->item[’guid’];

    Hope this will help other plugin users.

  9. Walt replied:

    I’ve been using FWP for a few months now with no issues - until now. I tried to add an eBay feed. It seemed to work OK when entered, but later when I tried to view some results, the “title” of the feeds (as listed in FWP) changed to “eBay error”. I noticed the search words were now mysteriously missing from the end pf the feed URL. Apparently, upon save, FWP truncates the feed URL (yes, eBay has a veerrrry long feed URL).

    BTW, this blog is WP 2.3.3, and the PHP level is 5.

  10. Muse replied:

    Hi Rad Geek,

    Thanks for this great plugin! It works fine in my blog. But i have little problem when setting cron jobs. I want to make it fully automatic, so i need to set up cron. The problem is, this is my 1st cron jobs setting :-) Could you tell me, which php path i should use to set on my cron jobs commands??

    Hope you can help me find the answer…

    Thanks a bunch :D

  11. Raj replied:

    I got this error

    Fatal error: Call to undefined function: getnestedcategories() in /home/…../public_html/wp-content/plugins/feedwordpress/syndication-options.php on line 151

  12. mactijn replied:

    Hi,

    Just a heads-up, fwp will not work with wp2.5.1. The kind folks there removed getnestedcategories() and writenestedcategories().

  13. Jason Hart replied:

    It looks like WP 2.5.1 broke feedwordpress by removing the getnestedcategories and writenestedcategories functions. I cant find much documentation on this change or why it wasnt mitigated for backwards compatibility. Tested with v.992

  14. bamik replied:

    I installed feedwordpress.0.992 on wordpress 2.5.1 and when I pushed option button under syndication button,this error seen:

    Fatal error: Call to undefined function getnestedcategories() in /home/myuser/public_html/mydomain/blogs/wp-content/plugins/feedwordpress/syndication-options.php on line 151

    my host is Hostmonster PHP version 5.2.5

    Please help me. Sorry for my english.

  15. Jeff replied:

    I just upgraded to WP 2.5.1 and now the “options” button for feedwordpress has died. Here is the error I get:

    Fatal error: Call to undefined function getnestedcategories() in /home/domain.com/wp-content/plugins/feedwordpress/syndication-options.php on line 151

  16. Robert Morgan replied:

    In syndication-options.php, I think it is line 151 ($dogs = getnestedcategories(-1, 0);), Wordpress 2.5.1 is giving me a ‘call to undefined function’ error.

    Can I fix this? How?

  17. Tony replied:

    I’m really looking forward to the next version. Thanks for making AND maintaining this plugin. It is excessively useful and totally awesome.

  18. Congress Check replied:

    In order to fix the options page for feedwordpress with 2.5.1 you need to look at the wp-admin/includes/template.php file in wordpress 2.3 and find the function for getnestedcategories and writenestedcategories copy these with ctrl + c.. Go into your wp-admin/includes/template.php file in wordpress 2.5.1 and paste these 2 functions at the top of the file. Boom it works again.

  19. Rad Geek’s Projects » FeedWordPress 0.993: WordPress 2.5.1 compatibility and a couple new features:

    […] to upgrade after installing FeedWordPress 0.993, please remember that after you upgrade WordPress, you will need to reinstall the FeedWordPress MagpieRSS upgrades in order to keep your feed parsing from getting […]

  20. Louie replied:

    Just a quick note, I use Lighter menus http://www.italyisfalling.com/lighter-menus/ and FWP breaks the drop down menus, I assume because its adding the syndication button up top. No biggie, FWP is much more useful than lighter menus!

  21. Rick replied:

    Maybe using Simple Pie & Simple Pie Core Plugin is the better way… Time ago I fill a bug against this issue, but they must be still thinking about it :)

    PS: Wonderful plugin, congratulations…

Post a reply

Posting comments

This form is for public comments. Consult About: Comments for policies and copyright details.

You can register for an account and sign in to verify your identity and avoid spam traps.

Formatting Comments

Use Markdown syntax for formatting.

  • *emphasis* = emphasis
  • **strong em** = strong em
  • [link](http://radgeek.com/) = link
  • `[_no_](format)` = [_no_](format)

Code blocks should be indented with four or more spaces at the start of each line:

    function _foo ($_bar) {
        return $_bar;
    } /* foo() */
By:
Your e-mail address will not be published.
Reply:

Sponsorship