4

Two of my top-level Pages, and all of their children, are missing from the dropdown menu in the Block Editor for selecting a Parent Page.

There are no special characters in the titles or permalinks. All of my other Pages do show up in the dropdown menu. And in fact, these two missing top-level Pages are already parents to some of my other Pages. They used to appear in the dropdown, and the database still has their IDs saved. (I do not know when they stopped appearing in the dropdown.)

So for example, if I look in the database at a child Page, the post_parent is set to the correct parent ID. And when I view the child Page or its parent Page on the front end, in the hierarchical left navigation both the parent and all of its children are shown. But when I edit the child Page, it says Parent Page is (no parent).

I've already:

  • Checked REST API is enabled (querying the REST API pulls them up accurately)
  • Checked postmeta (they have the same postmeta as the working Pages)
  • Checked taxonomies (no taxonomies assigned to these Pages, or to working Pages)
  • Checked Yoast settings (they are not noindexed or nofollowed)
  • Deactivated all plugins
  • Switched to Twenty Twenty theme
  • Hard-refreshed the Editor each time
  • Deleted one of the Pages, re-created it with the same slug, and saw that the new Page appeared as a Parent Page in the dropdown
1

3 Answers 3

1

I had the same issue on a site that I have inherited developer duties for. I found that with the Classic Editor Plugin Disabled although parent pages were still missing from the dropdown - I was able to key them in to the attributes box (with the Classic Editor Plugin enabled - direct keyed entry was prevented) and they were findable and settable. Not a solution but a workaround via the wordpress dashboard rather than via mysql.

Also note pages must be published by default to show How can I set a draft page as parent without publishing?

0

I had the same issue using WP Bakery page builder. In WP Bakery, there is an option to 'disable the Gutenberg Editor'.

For some odd reason, when I disabled Gutenberg, all of the correct pages were correct and missing ones were visible in the 'Parent Pages' dropdown choices. I suspect this issue had something to do with Gutenberg Editor, and when disabled, seemed to resolve the issue.

1
0

The root problem, as Elex helped me discover, is that the REST API only queries for a maximum of 100 pages at a time. This site had several hundred pages, and so only 100 of them would show at a time in the dropdown.

Publishing a new page and adding it as the parent of the old children works because that means the new page ID is high enough to be included in the query for 100 pages. It grabs the 100 highest IDs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.