Tuesday, September 25, 2007

I’m going through and reviewing my site after updating it to WordPress 2.3 and it looks like there are still some hidden “issues” stemming from the migration to the new Category/Tagging structure. The latest one that I found is related to the “Twitter Tools” plugin.

Update: Some people were reporting that “term_ID” was not working where “ID” was in capitals so I have changed the code references below to lower-case (e.g., “term_id”). Remember to retype your quotes!

Here is what I did to fix:

  1. Find, (Download), Open and Edit the “twitter-tools.php” file which resides in the “wp-content/plugins/twitter-tools/” directory
  2. Locate the following lines of code (around line 868):

    function aktt_options_form() {
    global $wpdb, $aktt;
    $categories = $wpdb->get_results(”
    SELECT *
    FROM $wpdb->categories
    ORDER BY cat_name
    “);
    $cat_options = ”;
    foreach ($categories as $category) {
    if ($category->cat_id == $aktt->blog_post_category) {
    $selected = ‘selected=”selected”‘;
    }
    else {
    $selected = ”;
    }
    $cat_options .= “\n\t<option value=’$category->cat_id‘ $selected>$category->cat_name</option>”;
    }

    [click to continue…]

{ 60 comments }

Last night I upgraded to the latest version of WordPress 2.3. See my previous posts (here and here) for more information. However during the upgrade process, I found an incompatibility with the new Category and Tagging functions and the theme I was using (HemingwayEX). On my homepage, I was getting the following error:

WordPress database error: [Table ‘weblog_td.wp_categories’ doesn’t exist]
SELECT cat_ID FROM wp_categories WHERE cat_name=’Asides’

This error was also appearing when using the HemingwayEX Asides module in my Sidebar. Luckily I had a local copy of my blog running on my laptop and I was able to figure out the differences between the two databases and the tables and fields therein. So, I have posted my results for the benefit of those users who have HemingwayEX as their theme.

In order to fix the code to make things work, this is all that you need to do:

  1. Find, (Download), Open and Edit the “functions.php” file which resides in the “HemingwayEX” folder in the “themes” folder
  2. Locate line 133 (or somewhere near that) that reads: [click to continue…]

{ 34 comments }