• Ferhat1986

    (@ferhat1986)


    So i’m an experienced WordPress developer and almost all issues I get, I can find a solution for. But this one kinda got me clueless.

    I’ve inherited a WordPress website which was built with Elementor. This website has a lot of pages with parent pages. Most pages have the same title but because of the hierarchy we can see which page belongs to which parent (city)

    So as an example we have the following structure:
    New York City
    – Page 1
    – Page 2
    Amsterdam
    – Page 1
    – Page 2
    London
    – Page 1
    – Page 2
    Berlin
    – Page 1
    – Page 2

    As you can see, the subpages have the same identical name. So when I’m on the Menu’s page and I want to configure the menu, I get to see the pages with the hierarchy. When i click the “View all” tab, I also see a couple of pages with the hierarchy, but when I scroll down the hierarchy is lost. So what I see is the following (example)

    New York City
    – Page 1
    – Page 2
    Amsterdam
    – Page 1
    – Page 2
    Berlin
    Page 1
    Page 2
    London
    Page 1
    Page 2

    Somehow there seems to be an issue. When inspecting the checkbox, I can see the Post ID. So I’ve double checked these posts and all have a parent set. I’ve also:
    1. Removed the parent and saved the post
    2. Reselected the parent and saved the post
    Still the hierarchy isn’t shown.

    I’ve disabled all plugins, updated WordPress and went back to a default theme with nav support (Twenty Twenty-One). Still the same issue

    I couldn’t find anyone else with the same problem. So at the moment I have a strange issue and can’t find a solution…

    Edit: added screenshot an example screenshot:

    View post on imgur.com

    • This topic was modified 7 months ago by Ferhat1986. Reason: added screenshot
    • This topic was modified 7 months ago by Ferhat1986. Reason: Added extra details to examples
    • This topic was modified 7 months ago by Ferhat1986.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Ferhat1986

    (@ferhat1986)

    I’ve done some more experimenting and installed a fresh WordPress environment and randomly added pages with parents. This seems to be a bigger issue than I thought. See attached screenshot.

    I’ve added a couple pages and added sub pages. I’ve duplicated these posts with Yoast Duplicate Post. The problem also exists in this newly installed WordPress environment. In this environment I only get the bug on page 2

    Menu
    Page 1: https://imgur.com/a/gLOtEto
    Page 2: https://imgur.com/a/pWyJrTQ

    All pages:

    View post on imgur.com

    Hello @ferhat1986 ,

    I attempted to replicate the issue using the Twenty Twenty-One and Hello Elementor themes, creating five sets of parent-child pages with identical names for the child pages. However, I couldn’t reproduce the problem you described, everything displayed correctly for me.

    https://share.cleanshot.com/tcq29V3v

    Given this, the issue might be related to your specific database setup or cache, and I suggest trying the following:

    1. Database Integrity Check:
      There might be inconsistencies or corruption in the database that are affecting the post hierarchy. Use a tool like WP-Optimize to clean and optimize your database. Alternatively, access your database directly via phpMyAdmin and examine the wp_posts table. Check whether the post_parent column is correctly set for each child page and reflects their respective parent IDs.
    2. Check WordPress Menu Cache:
      WordPress caches menu data, which can sometimes cause issues. Go to Settings > Permalinks, and click Save Changes without actually modifying anything. This simple action can refresh the menu cache and potentially resolve any hierarchy issues.
    Thread Starter Ferhat1986

    (@ferhat1986)

    @wpfy thnx for the reply and putting effort to replicate the situation. Could you please duplicate the pages untill you have 2 pages with menu items and check the second page? In my 2nd screenshot (Page 2) you can see there are a lot of “Page 1” and “Page 2” pages without a parent. Eventhough they have a parent as you can see in my 3th screenshot.

    I’m curious what you’ll see on the 2nd page.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress nav “All pages” hierarchy broken’ is closed to new replies.