• Boris

    (@travel-junkie)


    Hello there,

    I have upgraded WP from 2.2.1 to 2.3 RC1 just now and I am getting this database error:

    WordPress database error: [Table 'd0031cb3.wp_post2cat' doesn't exist]
    SELECT * FROM wp_posts ,wp_post2cat WHERE post_status = 'publish' AND post_type = 'post' AND post_date_gmt <= '2007-08-01 14:43:25' AND ( ID = '169' )AND post_date_gmt <= DATE_SUB('2007-09-20 03:35:43', INTERVAL 30 DAY) AND post_ID = ID AND (category_ID = '1' OR category_ID = '19' ) ORDER BY rand() LIMIT 1

    I have only found this error on top of the first page and on my archive page. otherwise everything seems to be working properly. So, any idea of what I can do to get rid of that error?

    You can check the error out on my site. Thanks for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You running plugins that might query THAT table? As Ryan Boren stated: “The big schema change is the dropping of the categories, post2cat, and link2cat changes in favor of the new terms, term_taxonomy, and term_relationship tables. Any plugin that queries against the old table will break horribly.”

    These three tables were most likely dropped after your upgrade: categories, post2cat, and link2cat. So, nothing else WP core related should be calling from those tables, except for maybe plugins?

    When doing an upgrade, I always go back to the Kubrick theme and switch off all plugins. Once the upgrade is complete and things are running, I slowly switch everything back on. That way if a plugin or theme gives me grief, I have an idea of what it is.

    Do you install the plugin, Google Sitemap ?

    KennyP, I was also facing the same issue, plus a “pluggable.php” issue, after editing a post. See below:

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

    After reading your last response, I deactivated my Google Sitemaps plugin. The problem disappeared.

    You need to upgrade your Google Sitemaps plugin to the latest version. Also, to fix the headers already sent message, read this. Generally it means, there’s white space before or after the <?php and ?> in the specific file.

    Check these two files once:
    wp-includes/wp-db.php
    wp-includes/pluggable.php

    Fix them accordingly. Hope this helps.

    Upgraded WP from 2.2.1 to 2.3,
    Yes,I think You need to upgrade your Google Sitemaps plugin to the latest version.

    _______________________________________________
    I wanted to learn Assembly breeds of Wordpass

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘database error after upgrade to 2.3 RC1’ is closed to new replies.