Thursday, January 03, 2008

Help needed for weird stuff happening in Wordpress

I recently upgraded Wordpress and have had some weird stuff happen.

First some conetnt for blog posts has dissapeared or partially been erased.

Second, when I go in to edit a post - or delete a static page I get this:

WordPress database error: [Table 'tomatomc_wrdp1.wp_post2cat' doesn't exist]
SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_ID

WordPress database error: [Table 'tomatomc_wrdp1.wp_post2cat' doesn't exist]
SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_ID

Warning: Cannot modify header information - headers already sent by (output started at /home/tomatomc/public_html/wp-includes/wp-db.php:160) in /home/tomatomc/public_html/wp-includes/pluggable.php on line 391

I have repaired the tables in MySQL but have no idea what this means or what i should do. Any help appreciated.

7 comments:

Andrew said...

i had something similar. For me it was a plugin causing the problem.

Disable all and then reinstate one by one until you hit the error again; then you know which one it was.

For me it was one that generated google sitemaps.

Dawn0fTime said...

I didn't run into this problem when upgrading, but did have another issue because I'd forgotten to rebuild my permalinks. It's always worth a try!

Did you disable your plugins before upgrading, then re-enable them? You have to rebuild your permalinks after enabling some of the plugins too. And if it says there's an update available, now's the time to do it!

Good luck!

Ed said...

Andrew, I do use Google Sitemaps - I'll turn it off.

Dansrecipes, I'll try rebuilding the permalinks. Thanks guys.

foodperson said...

I haven't had that particular problem, but I never heard about rebuilding permalinks. What's that all about? Is it important?

Ed said...

Did both and it worked. Foodperson it calls it updating permalink structure.

Elizabeth said...

I used to have that problem (can't remember what it was that caused it but it was probably a plugin).

What it got me to do though was to type up the draft for a post in notepad on my desktop and then copy and paste the blog entry into wordpress. This way, if wordpress does anything to the post, I still have it.

Anonymous said...

Wordpress - headache, treatment which possible reading FAQ.