Custom Query String 2.7 Broken in WP 2.3

It wasn’t lupus

Matt Read‘s lovely WordPress plugin that allows an admin to specify how many results are shown in a category archive, search, or index page had served me well for a while, but is presently not supported by its creator.

As a courtesy to the folks at Anime なの, I have listed this site only using the RSS feed for the Cartoons category; the other content here doesn’t have anything to do with the core theme of that aggregation site. I noticed earlier today that my most recent article regarding Sayounara Zetsubou Sensei didn’t show up on the なの, and started investigating. Turns out the RSS feeds for each of my categories was no longer being generated properly.

WordPress database error: [Table 'wp_burrowowl.wp_categories' doesn't exist]
SELECT cat_ID FROM wp_categories WHERE category_nicename = 'cartoons'

I had previously noticed that an odd error was showing up on my category pages, but since those get very little traffic (which is saying a lot for a low-traffic site like this), so I had put repairing the error at the back of my to-do list. The broken RSS feeds, on the other hand, struck me as far more interesting and hence a touch more urgent. A quick search on the web for the text of the error revealed a number of other sites afflicted by the same problem, and another search on the WordPress Forums got me just what I needed, somebody else with this issue and a work-around.

Turns out that in addition to messing up my Similar Terms plugin, which utterly broke my site, a more subtle issue had cropped up in WordPress 2.3 that changed the relationship between individual posts and the category system. This one’s a little more complicated than a simple find-replace in a text editor, so for the time being we’ll have to live with only getting 3 articles per screen, whether it’s the front page, a category archive, or search results.

Time to roll up my sleeves and dive into some more PHP, I guess.

Update:
With a little help from the Version 2.3 New Taxonomy page, I think I’ve got a real fix going. On lines 252 and 265 of Custom Query String 2.7, the now-defunct “categories” table is accessed. Switch the table to “terms” instead. There is no more “category_nicename” nor “cat_ID” these days, so replace the former with “slug” and the latter with “term_id.” The RSS feeds appear to work properly now, and both search results and category archives show more articles than the front page, as intended.