Forums

[resolved] WordPress Database Error (8 posts)

  1. jasondunn
    Member
    Posted 2 years ago #

    I upgraded to 2.3 today, and for the first time, something has gone very wrong. My page loads ok, and I can get into the admin tool and even start writing a post. But after maybe 30 seconds, the section below the tag (which I think would typically show the last saved time) says this:

    WordPress database error: [Table 'jason_wordpress.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

    If I click SAVE AND CONTINUE EDITING, I get this error:

    WordPress database error: [Table 'jason_wordpress.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/jason/public_html/wp-includes/wp-db.php:160) in /home/jason/public_html/wp-includes/pluggable.php on line 390

    I'm fairly technical, but this is over my head - I know very little about MySQL databases. Any suggestions here? I have no idea how to proceed or fix this..

  2. jeremyclark13
    Moderator
    Posted 2 years ago #

    Did you do this step in the upgrade process.

  3. jasondunn
    Member
    Posted 2 years ago #

    No, I didn't do the long upgrade, I did the quick upgrade which is the overwrite everything. Should I try the upgrade again and see if that helps?

  4. MichaelH
    moderator
    Posted 2 years ago #

    As jeremyclark13 suggested, I'd consider deleting the WordPress files and reuploading as per Steps 7 and 8 in Upgrading_WordPress_Extended.

  5. jasondunn
    Member
    Posted 2 years ago #

    Ok, that worked: I deleted everything I was supposed to, re-uploaded everything, and now it seems to be working - I'm not seeing the error anymore. I guess from now on I'll do the long-way upgrade. ;-)

  6. jasondunn
    Member
    Posted 2 years ago #

    Ok, not so fast...I'm not seeing errors when doing posts, but I had the Google Sitemaps plugin installed and when I tried to generate a sitemap I saw this error:

    WordPress database error: [Table 'jason_wordpress.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

    That's a very similar error - what exactly is "post2cat"?

  7. MichaelH
    moderator
    Posted 2 years ago #

    Yeah disable that plugin and get the new version that is compatible with 2.3.

  8. jasondunn
    Member
    Posted 2 years ago #

    Ah, ok then - the plugin didn't indicate that there was a new version on the plugin page, so it never occurred me to me to check. No more error now with the new version...

Topic Closed

This topic has been closed to new replies.

About this Topic