but i just tried limiting the categories returned in c2c_get_recent_posts(), and NO posts are returned. after looking at the code, i see that the code references the table wp_post2cat, which has not been a valid table in wordpress for quite some time.
does anyone have any quick workarounds?
thanks!
https://www.ads-software.com/plugins/customizable-post-listings/
]]>We did an update of a client from a very old version of WordPress to the latest. The problem is that the category assignments did not come through properly.
Old wordpress used wp_post2cat and the new one uses wp_terms and wp_term_relationships.
Is there any way to convert between the two? The Upgrade script did not do it and I would really like an easy way to modify this.
Thanks,
Roger
]]>WordPress database error: [Incorrect file format ‘wp_post2cat’]
SELECT post_id, category_id FROM wp_post2cat WHERE post_id IN (7)
I am using WordPress 2.2 and I have tried deactivating all the plugins, and I am still receiving the same error messages. Also, when I click on posts, they are not showing up.
Any help would be much appreciated. Thanks!
]]>How can i fix this ?
]]>WordPress database error: [Table ‘ivweb36_dining2.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
[Table ‘onethum2_newold.wp_post2cat’ doesn’t exist]
SELECT t1.ID, t1.post_title, t1.post_date, t1.post_content, t3.display_name FROM wp_posts t1, wp_post2cat t2, wp_users t3 WHERE t1.ID=t2.post_id AND t1.post_status = ‘publish’ AND t1.ID != 1022 AND t2.category_id IN (6) AND t2.category_id NOT IN (-9999) AND t1.post_author = t3.ID ORDER BY rand() LIMIT 3
I know it is not a theme problem since I switched to the default theme.
Does anyone understand the error message above, and does anyone know what I can do to correct this?
]]>I have just updated my word press install to version 2.3 and while it is working there are some strange behaviours that didn’t occur before which I’d love to shed some light on.
When I go to save a post or a page I often get the following errors instead of being routed back to the Manage Posts page:
WordPress database error: [Table 'pa_wp.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 'pa_wp.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/virtualsites/pixelapes.com/httpdocs/wp-includes/wp-db.php:160) in /home/virtualsites/pixelapes.com/httpdocs/wp-includes/pluggable.php on line 390
In addition to this I have seen some of these errors pop up under the editor box when writing a post, such as:
WordPress database error: [Table 'pa_wp.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
Fortunately these errors don’t seem to actually be affecting posting at all and posts are still written correctly.
I went through the upgrade process as detailed in the codex and it all seemed to run fine, with wp-admin/upgrade.php encountering no errors.
Any thoughts?
]]>There is a DB table called post2cat that holds all the category IDs for all posts (and attachments). BUT, WP is not writing the category ID to the attachments. It’s writing the default ID (uncategorized) no matter what I select in the categories check boxes. What’s most baffling is that it appears to work on an older install (2.2.1) on a different domain on the same web server. That’s what’s really bugging me. I’ve compared the two server environments and they are identical (which is as it should be – it’s a shared environment with php as apache mod).
I’ve tried all sorts of things to get this to work, but I’m at a loss as to why I the category ID is not written to the post2cat table for attachments.
WP 2.2.2 – fresh install/default template
Apache version 2.0.61
PHP version 5.2.4
MySQL version 4.1.22-standard