• so, i have a wordpress installation that uses just pages, no posts. its configured to have a page shown at the root.

    all my pages have disappeared, in the sense that they don’t show up and even the edit-pages admin page says there are no pages.

    the good thing is that the pages exist in the DB, and that in the edit-pages admin page the right ‘count’ of pages is show, despite the next line says ‘no pages found’.

    i’ve tried to look through the source code and found the actual SQL that runs to fetch the pages from the DB (SELECT * FROM <DB_NAME>.wp_posts WHERE (post_type = ‘page’ AND post_status = ‘publish’) ORDER BY menu_order, post_title ASC) and it works when i try to run it through the database. i even counted the number of rows (i injected code into wordpress) and see that it gets the right number of pages back.

    i made sure there are no plugins filtering anything out from this query.

    any suggestions?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter ohadpr

    (@ohadpr)

    update: navigating directly to specific pages using their URLs works. they just don’t show up in the editor and don’t return as part of ‘have_posts’ which causes the main page of my website to be ’empty’.

    What is actually showing up? You don’t say. An Error message? A WordPress message? Partial ttheme? What was the last change you made before this started? Also check your URL in the Settings.

    Thread Starter ohadpr

    (@ohadpr)

    what shows up is everything but the content of the page.
    the theme is ok, everything is ok, but it says ‘nothing here’.
    when i look at the code of the theme it shows that ‘have_posts’ returns ‘false’.

    like i also mentioned, the ‘edit pages’ admin page shows the counts of the pages but doesn’t show the list of the pages, something is causing the pages not to show.

    the URL in the settings looks right…

    i upgraded to the last wordpress, though i believe it started a few minutes before that.
    i also played with wp-config.php and how it chooses the actual config file (i have a simplified config file that chooses the configuration based on domain). but i reverted to my previous version of this file and things still don’t work.

    First try an original wp-config.php and not an edited version although of course you need ypour database stuff. That will tell you if the config is the problem.
    Also try the default or classic theme and see if the pages work.

    Has to be either code changed or problem with the database. If you can eliminate the code you might try doing a repair on the database. Make sure you save a backup first.

    Thread Starter ohadpr

    (@ohadpr)

    thanks for the reply.

    i’ve tried an original wp-config.php (just with my DB),
    tried checking and fixing the DB (it was ok),
    tried the default theme, same result.

    keep in mind that my pages don’t show even in the admin edit-pages configuration page. the count of the pages shows but wordpress thinks the actual pages are missing.

    it looks like an odd issue, any help in solving this would be appreciated. if there’s
    any other info i can provide please tell me.

    Did you move the site recently? Or change something in .htaccess? Sounds like the URLS pointing to the pages is wrong. Look through the database carefully. Has to be something simple.

    Thread Starter ohadpr

    (@ohadpr)

    after putting this aside for 2 days and getting back to it, it seems like the error was in wp-config.php logic.

    i still can’t figure out what caused the wordpress calls to return no pages as they existed in the database, but i’ve moved forward.

    thanks for your support

    I’m having a similar issue. I only have one page that I use. In the admin the pages count shows 1 page, but nothing is listed. Attempting to view the page by hitting the URL directly returns an “error not found” message.

    If I create another page, that page is listed, but the original page is not.

    When I view the record for the original page in the DB, everything is there. Nothing looks off.

    It’s happened twice now. Both times I recreated the page and it works fine for a while then disappears again.

    Any help would be appreciated.

    I figured this out. A forehead-thumper moment.

    My own function was causing it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘all pages have sort of disappeared’ is closed to new replies.