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:
- Find, (Download), Open and Edit the “twitter-tools.php” file which resides in the “wp-content/plugins/twitter-tools/” directory
- 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>”;
}and change it to:
function aktt_options_form() {
global $wpdb, $aktt;
$categories = $wpdb->get_results(”
SELECT *
FROM $wpdb->terms
ORDER BY name
“);
$cat_options = ”;
foreach ($categories as $category) {
if ($category->term_id == $aktt->blog_post_category) {
$selected = ’selected=”selected”‘;
}
else {
$selected = ”;
}
$cat_options .= “\n\t<option value=’$category->term_id‘ $selected>$category->name</option>”;
}Note: you may need to change the quotation marks if you cut and paste from this entry. Simply highlight the quote marks and enter them again using your keyboard. (Sorry about the loss of code formatting…there are tabs in there to nest things properly but it shouldn’t affect the code.)
- The database items that changed are (pre-2.3 –> post 2.3):
- categories –> terms
- cat_name –> name
- cat_id –> term_id
- The database items that changed are (pre-2.3 –> post 2.3):
- Save your changes to the twitter-tools.php” file and save to the “twitter-tools” plugin directory. That’s it!
HTD Says: More tweaks to themes and plug-ins because of WordPress 2.3 upgrade potentially coming. Stay tuned.




















Your Twitter Tools fix works great so far. I did have to go ahead and retype the quotation marks, as you stated. The funny thing was that when I went out and changed them en mass the fix did not work. So I started over again and changed the double quotes one line at a time as the WordPress plugin interface reported line errors upon activation. Then I would reactivate the plugin and fix the next line until the plugin successfully activated. The thing is that not all the double quotations were changed before the plugin started working. But the plugins seems to be working now so I will leave it alone.
Thanks for your efforts!