WordPress database error @ 2.3 (11 posts)

  1. guxo
    Posted 8 years ago #

    i had this error in the frontpage after upgrade to 2.3

    WordPress database error: [Table 'a19108.wp_categories' doesn't exist]
    SELECT cat_id, cat_name FROM wp_categories WHERE link_count >= 1

    check this error @ http://www.joaorico.com

  2. spencerp
    Posted 8 years ago #

    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 dropped after/during your upgrade: categories, post2cat, and link2cat. Please disable any plugins that might be using one of those three older tables, and try again. You can look here to see if your plugins were updated for 2.3 or not. Thanks.

  3. Arne Brachhold
    Posted 8 years ago #

    Somebody should make a sticky post about DB errors.

  4. spencerp
    Posted 8 years ago #

    I know, I totally agree. LOL!

    p.s. oh geez, enough of this repeating self all day and night, I'm going to bed! later folks! lmao

  5. guxo
    Posted 8 years ago #

    i deactivate all plug-ins, one by one, and the message didn't disappear

    the problematic code is:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar_right') ) : ?>

      <?php wp_get_archives('type=yearly'); ?>

    if (wp_version() == '20') {
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    else {
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->categories WHERE link_count >= 1");
    foreach ($link_cats as $link_cat) {

    <?php } ?>
    <?php endif; ?>

  6. spencerp
    Posted 8 years ago #

    Nice catch guxo! I added this to the sticky on front page..

  7. cliffmaster
    Posted 8 years ago #

    Hello, I get the following error when posting or editing a page or post. However the page and posts will still take the edit. This happens right after I hit save. All my plugins show updated.

    Here is the error I get

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

    Thanks in advance for any help I can get.

  8. Geezerjim
    Posted 8 years ago #

    Take a look at the sticky post spencerp referenced above.

  9. cliffmaster
    Posted 8 years ago #

    The problem was the google site-map generator. I had version 3.0 but the problem was, I downloaded it prior to 9/24/2007.

  10. doc_holiday
    Posted 8 years ago #

    As many posts as there has been google site map generator, there should be a sticky!!!!!!!!!!!!!

  11. rabmaster
    Posted 7 years ago #

    Basically, you should be removing all references to the old wp_categories etc that aren't there any more and replacing them with new ones, or just taking them out for now. Or any plugins that call these tables!

    Get the newest (compatible) plugins, or fix them yourself.

    A lot of themes have stuff that calls them too, so check in Sidebar.php, footers and headers, depending on your theme.

    It is a bit of a pain, but worth it when one considers just how good WordPress is!

Topic Closed

This topic has been closed to new replies.

About this Topic