Unable to set parent page
Describe the bug When creating a new page or editing an existing page, the Page Parent option is not always shown. After waiting for seconds, it appeared sometimes. If it appeared, the hierarchy is not correct with some existing pages that are not under the right parent in the list and missing pages below their actual parent.
To Reproduce Steps to reproduce the behavior:
- Go to 'Create New Page'
- See 'Page Attributes'
- No 'Page Parent' option
Expected behavior A select field to set the parent of a page. The options in the select must be ordered well and belong to the right parent.
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Google Chrome
- Version: 71
Additional context
- WordPress version: 5.0.3
I have the same issue, exactly as you described it. The only workaround that I've found is after creating a new page, go to Pages, find the page and do a quick edit to set the parent.
I have the same issue as well. Has there been any progress?
This issue may be a duplicate of https://github.com/WordPress/gutenberg/issues/9441.
Note the comment at https://github.com/WordPress/gutenberg/issues/9441#issuecomment-466501440 which mentions the parent page selector can take a very long time to load if the site has a high number of pages, such as hundreds or thousands. Because of that, it would be helpful if each person who is experiencing this issue could make a note of the total number of pages saved on the site where they are experiencing the problem. It's also helpful to list which WordPress version you are testing if possible. Thank you!
In case this ever gets forgotten about (unlikely because there are hundreds of posts about this), this is major flaw in Gutenberg, and causing a major problem that didn't exist before.
I'm getting a 500 error in my console for the /wp-json/wp/v2/pages file which always appears. This seems to be blocking the parent page selector from appearing. No chance of getting this to disappear though.
I assume this is actively being investigated with the Gutenberg team?
I wanted to update here. We tried several ways but we're unable to reproduce the issue ourselves. We'd love if someone could check in itw own installation why the api call is failing to find the root cause here.
It's probably related to another issue I'm having where every time I try and update a page I get a red error banner saying 'Updating failed'.
Massive issues with Gutenberg, it should never have been released.
Does this help you at all?

First let me say, that that's not an issue with Gutenberg. You likely have something breaking your REST API. It could be a plugin (some security plugins disable it), a firewall, a server config...
Also, it seems you could have PHP errors/warnings that leak into the REST API calls responses and trigger this kind of errors. Make sure to check your logs and see if there's no error there.
It must be a problem with Gutenberg, because even with all plugins deactivated, granted the above errors disappear, but I then have the original 500 error with the /wp-json/wp/v2/pages URL I mentioned earlier.
This is with a pure WP instance running, with no plugins. It's a bit of a coincidence if several others were having the same issue, if it's down to a firewall or server configuration.
The issue here lies within Gutenberg, so pleas ejust because you're unable to diagnose and fix it, don't just claim it's not an issue with Gutenberg.
I'm sorry you're having issues, we can't disagnose and fix an issue we can't reproduce, I hope you understand that. We had several similar complaints about this kind of issues and it always come down to the same root issues I explained above.
Tell you what, I'm going to stick with the Classic Editor for all the websites I run, and get them all back to a stable, working state whilst the Guternberg team are able to fix the broken product they have forced onto us.
I'm not the only one to think it's an incredibly bad product / feature, and that it should be removed.
Just wanted to comment that I resolved the issue on my install. It turned out to be a bad plugin that messed up the REST API JSON.
Would you be willing to share which plugin it was? I've duplicated my site in a sandbox and disabled all plugins and still have a problem.
It was WP Gallery Custom Links.
Hmmmmm. I just imported my database of my development site (1057 pages and 391 posts) into a fresh install of Wordpress. No plugins installed. When I edit a page it takes about ten seconds for Parent Page to show up. When it does it's not in any logical order. At least I'm not seeing the same page listed multiple times, but they're definitely not in alphabetical order like they are when I do a quick edit in Pages. In my development site with a full set of plugins I'm seeing multiple listings of the same page under Parent pages, so it must be a plugin causing that. Now to figure out which plugin is causing pages to be listed multiple times. But it still doesn't resolve the issue that even with no plugins Pages aren't listed in an reasonable order.
I wonder if we can add an enhancement here, Gutenberg basically tries to fetch all pages before displaying the Parent Page dropdown. When a site has many pages this can lead to long delays before UI appears, and should any of the requests error, I believe the UI fails to load.
One enhancement would be to display a search component when the number of pages is > X. There's no reason that the client needs to fetch everything when there are thousands of pages.
I really don’t understand why this is so different than before? It didn’t take ages to display a drop down with all pages in hierarchy.
So why does it now? There’s something seriously wrong here. There’s a been a step backwards, which just makes no sense.
Why hasn’t this been picked up on and fixed sooner?
On Wed, 29 May 2019 at 6:39 pm, Kerry Liu [email protected] wrote:
I wonder if we can add an enhancement here, Gutenberg basically tries to fetch all pages before displaying the Parent Page dropdown. When a site has many pages this can lead to long delays before UI appears, and should any of the requests error, I believe the UI fails to load.
One enhancement would be to display a search component when the number of pages is > X. There's no reason that the client needs to fetch everything when there are thousands of pages.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/13624?email_source=notifications&email_token=ABS7JBICU43IXBCXZUXQ6ITPX25UTA5CNFSM4GTUECB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQC52Y#issuecomment-497037035, or mute the thread https://github.com/notifications/unsubscribe-auth/ABS7JBLJCMH4BUN4K5VE66DPX25UTANCNFSM4GTUECBQ .
@gwwar yes, this is something that we want to do (See #7385) @adamsilverstein has been working on it at some point but he might need some support now. The main issue we had was the difficulty to build an a11y autocomplete component.
I would welcome some support, especially adding some e2e tests for the existing PR functionality.