WordPress.org

Support

Support » Installation » “wp_categories’ doesn’t exist” error in database wp 2.3

“wp_categories’ doesn’t exist” error in database wp 2.3

  • minimalnet
    Member

    @minimalnet

    WordPress database error: [Table ‘minimal_basedatos.wp_categories’ doesn’t exist]
    SELECT cat_ID, cat_name FROM wp_categories

    Hi, I have this error in my k2 comfiguration section when i updated to wordpress 2.3, also without any plugin activated.

    Whats the problem?.

Viewing 15 replies - 1 through 15 (of 40 total)
  • spencerp
    Member

    @spencerp

    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.

    Also, like said on Upgrade instructions.. PLUGINS SHOULD BE DISABLED BEFORE UPGRADING BLOGS!

    minimalnet
    Member

    @minimalnet

    I had all the plugins deactivated to update wordpress and now in my test blog I am not using none plugin and the problem is there.

    minimalnet
    Member

    @minimalnet

    I have tried to do a test, to install the version 2.13, update, all fine then, but after install the 2.3 version again the same error.

    spencerp
    Member

    @spencerp

    I have this error in my k2 comfiguration section

    Perhaps K2 itself is the culprit? I’m not familiar with K2 at all, did they announce any possible up-to-date versions of K2 lately, that may work on 2.3 version? As I said, I’m not familiar with K2 at all really… so I wouldn’t know. Maybe someone else in here will know? Good luck. =)

    minimalnet
    Member

    @minimalnet

    Ok i go to try install a k2 new template for test.

    redsil
    Member

    @redsil

    I’ve run into the same problem with those plugins (recent posts and category exclusion) that rely on the old category schema. Does anyone have any idea how the new structure can be queried to achieve the same aim? For example, what kind of query would one need to pull recent posts from the database? Thanks.

    minimalnet
    Member

    @minimalnet

    Finally seems was k2 template problem, i removed this lines in the configuration and now seems work fine:

    // Get the asides category
    	$asides_id = get_option('k2asidescategory');
    	$asides_title = $asides_id != 0 ? $wpdb->get_var("SELECT cat_name from $wpdb->categories WHERE cat_ID = $asides_id LIMIT 1") : __('No Asides','k2_domain');
    
    	// Get the categories we might use for asides
    	$asides_cats = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories");
    
    			<h3><?php _e('Asides','k2_domain'); ?></h3>
    
    			<p><small><?php _e('\'Asides\' is a category of entries, meant to be \'smaller\' and perhaps of \'less importance\', like for instance links with minor commentary. They are styles differently than other entries to separate them content-wise. Below you can select a category to be shown as Asides.','k2_domain'); ?></small></p>
    
    			<p>
    				<select id="k2-asidescategory" name="k2[asidescategory]">
    					<option value="0" <?php selected($asides_id, '0'); ?>><?php _e('No Asides','k2_domain'); ?></option>
    
    					<?php foreach ($asides_cats as $cat) { ?>
    					<option value="<?php echo attribute_escape($cat->cat_ID); ?>" <?php selected($asides_id, $cat->cat_ID); ?>><?php echo($cat->cat_name); ?></option>
    					<?php } ?>
    				</select>
    			</p>
    Jeff Chandler
    Volunteer Moderator and Voice of WP

    @jeffr0

    I found out that my Ultimate Tag Warrior plugin was the one generating these errors. I would import that plugins tags into the native tags area but where the hell are the importers? I can’t find them

    DonPietro
    Member

    @donpietro

    I’m getting the same error using the Custom Query String UTW plug-in.

    Hopefully the developers of these plug-ins will release updates for 2.3 soon. Its really appreciated.

    spencerp
    Member

    @spencerp

    I would import that plugins tags into the native tags area but where the hell are the importers? I can’t find them

    Top navigation menu…MANAGE > IMPORT

    americasroof
    Member

    @americasroof

    I did four upgrades that had no problems on two different domains hosted by the same ISP. However two upgrades on a different domain hosted by a different ISP had this problem. This is a VERY serious problem as it is exposing the database structure. I hope it can get resolved quickly. Thanks.

    silencer
    Member

    @silencer

    my k2 based site is running.. i had some errors while upgrading using upgrade.php and the interface worked fine.. i imported the tags from UTW and disabled utw and similar post plugins along with few others…. now the error when i post something or try to delete the post.. it says things like

    WordPress database error: [Table ‘XXX.wp_post2cat’ doesn’t exist]
    SELECT YEAR(post_date) AS year, MONTH(post_date) AS month, category_id FROM wp_posts INNER JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE post_date > 0 AND category_id <> 11 AND category_id <> 2 AND category_id <> 7 AND ID = 247 ORDER By post_date DESC

    WordPress database error: [Table ‘xxxx.wp_post2cat’ doesn’t exist]
    SELECT DISTINCT YEAR(p.post_date) AS year FROM wp_posts p INNER JOIN wp_post2cat p2c ON (p.ID = p2c.post_id) WHERE p.post_date > 0 AND p2c.category_id <> 11 AND p2c.category_id <> 2 AND p2c.category_id <> 7 ORDER By p.post_date DESC

    WordPress database error: [Table ‘XXX.wp_post2cat’ doesn’t exist]
    SELECT DISTINCT MONTH(p.post_date) AS month FROM wp_posts p INNER JOIN wp_post2cat p2c ON (p.ID = p2c.post_id ) WHERE YEAR(p.post_date) = 2007 AND p2c.category_id <> 11 AND p2c.category_id <> 2 AND p2c.category_id <> 7 AND p.post_date_gmt < ‘2007-09-27 10:33:01’ ORDER By p.post_date DESC

    WordPress database error: [Table ‘XXX.wp_categories’ doesn’t exist]
    SELECT cat_ID, cat_name, category_nicename, category_parent FROM wp_categories c WHERE c.cat_ID > 0 AND c.cat_ID <> 11 AND c.cat_ID <> 2 AND c.cat_ID <> 7 ORDER BY c.cat_ID asc

    WordPress database error: [Table ‘XXXX.wp_categories’ doesn’t exist]
    SELECT c.cat_ID, COUNT(distinct p2c.post_id) AS cat_count FROM wp_categories c INNER JOIN wp_post2cat p2c ON (c.cat_ID = p2c.category_id) INNER JOIN wp_posts p ON (p.ID = p2c.post_id) WHERE p.post_status = ‘publish’ AND p.post_date_gmt < ‘2007-09-27 10:33:01’ AND c.cat_ID <> 11 AND c.cat_ID <> 2 AND c.cat_ID <> 7 GROUP BY p2c.category_id

    WordPress database error: [Table ‘XXXX.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

    but the fun part is the POST is posted take a look at the bunch of image links i’ve posted
    http://img233.imageshack.us/img233/1562/wppost1kj6.jpg
    http://img264.imageshack.us/img264/4482/wppost2kk5.jpg
    http://img146.imageshack.us/img146/2569/wppost3lq2.jpg

    anyone has any idea on solving this issue?

    americasroof
    Member

    @americasroof

    Upon further thought about the problems on my installations. I wonder I successful upgrades from an incremental version while the unsuccessful upgrade was based on an much earlier version of wp (I don’t recall the delete tables command on the successful upgrade).

    It seems like there are a lot of installation problem posts. Is there a way to safely DOWNGRADE to a more stable version that avoids this (and other problems)?

    americasroof
    Member

    @americasroof

    BTW minimalnet what file had the configuration you mentioned earlier?

    Also, I don’t know what you mean when you are referring to “K2”

    Thanks.

    silencer
    Member

    @silencer

    @americasroof – k2 is a well known simple manageable template which offers a bit more than the usual.. http://www.getk2.com..

    have a look at the pictures.. after all the error while posting.. it actually post the entry.. ;]

Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘“wp_categories’ doesn’t exist” error in database wp 2.3’ is closed to new replies.