cordobo-green-park 0.9.3 BETA 4 error with WordPress 2.1

Posted on February 3rd, 2007 in WP Themes by snnicky

I upgraded to Cordobo Green Park 0.9.3 BETA 4 and WordPress 2.1.

After that I got the following error on a right sidebar:

WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
SELECT cat_id, cat_name FROM

WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1] SELECT cat_id, cat_name FROM

I searched the Internet and found the similar problem described and resolved (http://mu.wordpress.org/forums).

To fix the problem I modified WordPress/wp-content/themes/cordobo-green-park/sidebar.php the following way.
Replace

$link_cats = $wpdb->get_results(”SELECT cat_id, cat_name FROM $wpdb->linkcategories”);

with

$link_cats = $wpdb->get_results(”SELECT DISTINCT cat_name, category_id cat_id FROM $wpdb->categories INNER JOIN $wpdb->link2cat ON $wpdb->categories.cat_id=$wpdb->link2cat.category_id”);

As far as I understand linkcategories table became obsolete in WordPress 2.1 and was dropped. I guess the fix is not compatible with WordPress 2.0.

If you know how to fix the error in a better way - please share with us.

Thank you.

One Response to 'cordobo-green-park 0.9.3 BETA 4 error with WordPress 2.1'

Subscribe to comments with RSS or TrackBack to 'cordobo-green-park 0.9.3 BETA 4 error with WordPress 2.1'.

  1. snnicky said,

    on February 3rd, 2007 at 10:24 am

    I’ve just checked http://cordobo.com.

    The author has already fixed the sidebar for WordPress 2.1. And the fix is better (more simple). Just call

    wp_list_bookmarks();

    :)
    Check http://cordobo.com/2007/01/25/updateupgrade-to-wp-21/.

Post a comment