I’m helping my friend Tina move her blogspot blog to a wp installation on her own website and I’d used the category to tag convertor when I was checking through all her posts to see if things were formatted correctly.Well, I’ve used this tool before and noticed that when you do this it removes all those categories and makes them tags.
This threw me off at first but I got over it.
Except I did first assume that this tool would duplicate, not remove. And in this particular caseI didn’t think that posts that once had a certain category assigned to them would be assigned to a read only uncategorized category. In essence un assigning them. Poor little orphans.
By read only I mean Uncategorized was just text and not a linked category when I went to Manage Posts…
So on her blog if you happened to click on a word in her tag cloud that belonged to a post that used to belong to a category that was converted to a tag but hadn’t been assigned a new category upon saving the post,it made a database error and led to a blank page instead of the single post view.
I read her error log and it told me it was a database error. I didn’t understand the error but I did notice that posts that had both tags and a category were fine and if you clicked the title permalink it led to the single post view.
So all I had to do was go through all her posts that had the text-not-linked Uncategorized category and assign those posts a category.
With my keen powers of observation and deduction I managed to resolve a database error that I didn’t understand. And I didn’t die.
Here is the lovely error message:
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’ ORDER BY comment_date_gmt DESC LIMIT 10′ at line 1 for query SELECT wp_comments.* FROM wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’ ORDER BY comment_date_gmt DESC LIMIT 10