Upgrade Downgrade: Compatibility bugs and possible quick fixes for issues with FeedWordPress after upgrading to WordPress 2.5

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.

25 thoughts on “Upgrade Downgrade: Compatibility bugs and possible quick fixes for issues with FeedWordPress after upgrading to WordPress 2.5

  1. 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 😀

  2. 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

  3. Hi,

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

  4. 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.

  5. 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

  6. 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?

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

  8. 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…

  9. hello, I’m using feedwordpress on all my blogs and it works great, but…there is some issue

    if I need to enter posts manually, uploading files options (URL, title,capture, ecc.) in popup ajax form are unavailable

    I have to disable feedwordpress for a while, creating my posts, uploading my images, adding file tags to post using ajax form

    then I get back to plugins and enable it back again

    some fix for this issue?

    thanks

  10. Is it possible to limit the number of auto posts per day? i.e. 1 post per hour or 2 posts per day..

Comments are closed.