This is a bit of a long shot, but someone may have seen it before.
I’m helping someone out who’s got a problem with a multisite after upgrading to 3.2.1 (I’m not sure which version the upgrade was FROM).
Sites created after the upgrade are basically giving empty queries for anything other than single posts. Categories, indexes, pages, all empty and either returning 404’s or empty lists.
I’ve checked permalinks, and made a few tweaks, but with no improvement. I’ve re-saved permalink’s for the new sites in question to no avail.
I’ve checked options in the database, and checked out the wp_xx_posts table too. All is good.
I can see no differences between a site that works (created prior to the upgrade) and a site that doesn’t.
I’ve tried doing some debugging. I can’t see any database errors, the only thing that’s odd is if I do:
<?php print_r($_SERVER["REQUEST_URI"]); print_r( $GLOBALS['wp_query']->query ); $GLOBALS['wp_query']->get_posts(); print_r($GLOBALS['wpdb']->last_query); ?>
at the top of the 404.php, it echoes the following query:
SELECT wp_XX_posts.* FROM wp_XX_posts WHERE 1=1 AND wp_XX_posts.post_name = 'sample-page' AND wp_XX_posts.post_type = 'post' ORDER BY wp_XX_posts.post_date DESC
post_type = 'post'when I’m querying for a page.
However, I get this same query on a site that works if I go get a random page on there too.
I read something about a database collation issue and so checked my database collations – they all seem to be the same for sites that work and for sites that don’t.
I’m pretty good at this stuff, but I’m totally stumped. Any ideas?
- The topic ‘New sites giving 404's/empty indexes/archives after upgrade’ is closed to new replies.