(Note: If you don’t use Wordpress, you probably don’t need to read this post. It is only here for those searching for a solution to a specific problem.)
After upgrading to Wordpress 2.0.4, I noticed a nasty error on the categories pages. It looked something like this:
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 'AND
comment_approved = '1'' at line 1]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = AND comment_approved = ‘1′;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 'AND post_status IN ('private') LIMIT 1' at line 1]
SELECT post_status FROM wp_posts WHERE ID = AND post_status IN (’private’) LIMIT 1
While troubleshooting, I suspected that one of my plugins wasn’t compatible with the newest version of Wordpress…
Problem #1: I have a bajillion plugins.
Problem #2: My template is very reliant on these plugins.
Action Plan:
- Post a note on my blog:
“Things could look a little goofy around here for a while… Pay no attention to the woman behind the curtain.” - Go to the default template. {GASP!}
- Turn off all plugins. {Breathe… Breathe…}
- Start turning on the plugins one at a time. (I should have done this when I first upgraded.)
- Find the bad guy and remove all mention of it in the template if necessary.
- Pray and hope it all gets better.
- Change back to my theme of choice and see if everything is working correctly.
I soon discovered that Adhesive 3.0 was the renegade plugin. Too bad, I really like this one. It makes posts ’sticky’ so that they’ll stay on the top of your page regardless of the time they were published. This comes in really handy on the categories pages… if it doesn’t break.
I couldn’t find a new version of Adhesive on the plugin’s web page, but I did find one in the Wordpress Support forum.
I upgraded to Adhesive 3.2. Problem solved!
Search Phrase: Wordpress upgrade breaks category page












Thanks for posting this Amy!
Comment by Sheri Bigelow — 12/19/2006 @ 9:41 am
Thanks, I have been looking for that. Regards..
Comment by bilim adamlar? — 5/3/2008 @ 2:46 pm