WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "No posts found" but count shows 5,995 (5 posts)

  1. philipjohn
    Member
    Posted 2 years ago #

    Hey folks,

    It's not often I post a new thread here but I'm in search of any ideas with an issue I've got.

    I discovered today, to my horror, that I can no longer see any posts in my admin despite the count showing the correct number.
    Screenshot: http://screencast.com/t/Y4bDhkdkWd7

    This happens on all sites (it's a v3.2.1 Multisite) with all post types (one of the sites uses MarketPress and the same happens with products).

    The posts are in the database, visible on the frontend and editable so long as you can find your way to the edit post page.

    I took the site offline, deactivate all plugins (both per-site and network), switched to Twenty Ten on all sites and de-activated mu-plugins (just domain mapping).

    No dice.

    Something else, which may be related, is that my network users shows 3 super admins in the count when there are only two.
    Screenshot: http://screencast.com/t/h4oldVEr

    I've checked the database and there are only two accounts (those two correctly listed) with a wp_user_level of 10. The next level down held by anyone is a 7. wp_capabilities also correctly indicates administrator for only those two accounts.

    The whole network is now bare - there is nothing that isn't out-of-the-box WordPress, it's like a fresh install.

    Any ideas?

    *tears hair out onto keyboard*

  2. Samuel B
    moderator
    Posted 2 years ago #

    assuming a linux server - rename your .htaccess, then reset your permalinks
    if wordpress rebuilds your .htaccess, check posts now
    if not create an .htaccess and add the rules it gives you manually
    test site

    if everything works, copy any custom rules from renamed file to new .htaccess

  3. philipjohn
    Member
    Posted 2 years ago #

    Not sure how it'd be a .htaccess issue? Anyway, even removing it made no difference I'm afraid!

    I've tried repairing all tables, dropping indexes, making sure collation was utf8_general_ci on all tables.

    Still nothing :(

    With a little help with debugging I found that the query run by WordPress is this:
    SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND (wp_posts.ID = '0') AND wp_posts.post_type = 'post' ORDER BY wp_posts.post_date DESC

    Running that in phpMyAdmin produces an empty result set but it works if I take out this bit:
    AND (wp_posts.ID = '0')

    So I just need to find out what's adding that bit!

    Any suggestions?

  4. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Is it possible that those many posts is causing a server side issue such as memory allocation or php timeout causing a fail, thus returing 0 posts (yet another part keeps everything running, plugins etc?)

    Can you add a filter to return 100 posts?

  5. philipjohn
    Member
    Posted 2 years ago #

    Not that, as the same happens on other sites that have only 5 posts.

    Sorted it now though... We realised that it was happening on another Multisite and two single site installs on our servers.

    There had been a mod_cgi update which, when rolled back, resolved the issue.

    We had been using FastCGI!

Topic Closed

This topic has been closed to new replies.

About this Topic