The Wordpress 2.3 Upgrade

One of the less elegant things about open source software is the upgrade process. Because systems like Wordpress are so dependent on third party themes and plugins, it is inevitable that any “breaking” release is going to cause havoc. And any problems are likely to be exaccerbated by the fact that so many of the users have little or no programming skills.

Wordpress 2.3 looks like it has suffered in this way. In the first few days after it came out there was a rash of complaints about broken plugins and themes. A lot of these were apparently due to people making raw SQL calls in themes, which rather boggled me, but again what can you expect with so many inexperienced developers involved.

Plugins had problems too, because 2.3 changed the database schema (surely it should have been called 3.0 in that case?). Those that still have active support have now mostly been updated, but there do appear to be a few weird things still happening.

I did my first 2.3 upgrade yesterday. Being a programmer of many years experience, I was a good girl. I did a test upgrade on a local server first. It worked fine. So I did the upgrade on the live version as well. And it failed. Thank you, Murphy.

The problem I was getting was an error that read, “Warning: array_key_exists(): The first argument should be either a string or an integer in …/category-template.php on line 176.” There are at least two support questions about this on the Wordpress forums, but no one seems to have provided a definitive explanation. It certainly involves calls to the function in_category(). There’s a fix out there that involves hacking the line in question, but that apparently just makes the problem go away, it doesn’t fix it. And it sure doesn’t explain why the code it worked fine for me on the test install, but not live.

As it turns out, I was able to find a call to in_category() in the theme I was using, and it was part of a bit of functionality I wasn’t using, so I’m OK.

I don’t have the time to track this down, but if anyone is interested the obvious differences between my test and live implementations are the versions of PHP and MySQL. These are:

Test: PHP 5.2.1.1; MySQL 4.1.8
Live: PHP 5.2.3; MySQL 5.0.45

Meanwhile I have more upgrades to do, and they involve different themse and different plugins. Here’s hoping that they are not all quite so interesting.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Bad Behavior has blocked 55 access attempts in the last 7 days.