On WordPress Upgrades and Errors

As much as I love and use WordPress, it can occasionally be a major pain in the ass.

Like whenever upgrade time rolls around. There’s a certain amount of crossing fingers and praying when I upload a new batch of files to the server.

Is the theme going to break? Is a plugin going to mung things up? Will I be able to access my admin screens?

I admit, I am a bad upgrader. I turn no plug-ins off. I don’t make a database back-up right then and there. I live on the edge of the danger zone!

(Note to self. Back-up database.)

Yesterday’s upgrade to WordPress 3.1 went comparatively smoothly. Nothing seemed to obviously break.

But when I went to write a post, the dropdown menus didn’t work, and WordPress stared at me blankly when I tried to add tags. I didn’t realize it, but at the very bottom of the page, far below my screen, WordPress was telling me that I had a php Fatal Error.

This Fatal Error manifested on only two screens — the Dashboard and the Write Post screens. I spent two hours last night trying to figure out which plugin caused the trouble.

I eventually narrowed it down to Twitter Digest, the plugin I use to archive my tweets into my blog database. (I had been using Twitter Tools for that, until one day Twitter Tools decided that it didn’t want to do that anymore. Twitter Tools is fickle.)

I deactivated the plugin, and everything was fine.

I did some research when I got home from work tonight. Google led me here — a WordPress bug report.

The implementation of the json_encode and decode compatibility functions is incompatible with plugins that already included the Services_JSON class

Hmm. This seemed promising.

I experimented a little with compat.php. I reactivated the plugin. The Fatal Errors came back.

Bollocks.

I did more research.

I discovered that Twitter Digest contains the entire JSON class. Of course it does; it was written for a version of WordPress that didn’t have the JSON functions. Defining the same function twice would naturally break WordPress.

So I deleted that entire chunk of code from the plugin.

I have my fingers crossed that it works. It seems to. I reset the digests, and Twitter Digest has created a tweet archive for yesterday’s tweets.

Still backing up the database, though. šŸ˜‰

Leave a Reply

Your email address will not be published. Required fields are marked *