Sabahan.com Upgraded To WordPress 2.1
February 2, 2007 by Gaman
Yes finally, I’ve upgraded Sabahan.com to WordPress 2.1.
Everything including my plugins seems to be working fine except some hiccup in the Categories section and Blogroll.
After the upgrade, I noticed the following error raised from the Categories section.
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
A member of WordPress.org points out that $wpdb->linkcategories returns a NULL value in WordPress 2.1, hence breaking the SQL query.
There’s a simple fix to get around this problem. All you have to do is change the following code
$wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
$wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->categories WHERE link_count > 0")
And for the Blogroll, I have found a fix for this but it breaks my template’s CSS formatting. So I’ve temporarily removed the Blogroll until I get around to fixing it.
Basically WordPress 2.1 uses a new function, wp_list_bookmarks(), to display the Blogroll links which was not available in WordPress 2.0. This new function displays bookmarks found in the Bookmarks Management screen.
More discussion about this here.
update: Alternatively, you can use
get_links_list() to display your Blogroll.
If you haven’t upgraded your installation to WordPress 2.1, I highly recommend it. Besides the feature enhancements, there are over 500 bugs fixes included in this release.
Note that you will need PHP version 4.2 or greater and MySQL version 4.0 or greater in order to install WordPress 2.1. There an easily to follow, step-by-step upgrade instructions here.
I am still trying to make sure this upgrade doesn’t break any functionality at Sabahan.com. If you find something is not working as it should, please let me know