Page List: Parent control query limit is too small#69676
Page List: Parent control query limit is too small#69676snehapatil2001 wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| // We only show the edit option when page count is <= MAX_PAGE_COUNT | ||
| // Performance of Navigation Links is not good past this value. | ||
| const MAX_PAGE_COUNT = 100; | ||
| const MAX_PAGE_COUNT = 500; |
There was a problem hiding this comment.
The 100 is the default limit of the REST API; changing it to 500 would result in an error. Additionally, we can't use unbound query here due to the performance issue noted above
|
Can we close this PR? Similar limitations exist elsewhere: Perhaps we should discuss the REST API limitation itself. |
|
Let's close this PR and look for an ideal alternative approach. @snehapatil2001 Thank you for your efforts! |
What?
Closes #69608
Increases the Page List block parent control query limit from 100 to 500 pages.## Why?
The Page List block currently cannot be used effectively on websites with more than 100 pages because the parent control dropdown is limited to showing only 100 pages. This makes it impossible for users to select parent pages that are deeper in the hierarchy or later in the alphabetical listing when there are more than 100 pages on the site.
How?
This PR updates the
MAX_PAGE_COUNTconstant in the Page List block's edit.js file, increasing the limit from 100 to 500 pages. This allows the parent control dropdown to load and display up to 500 pages, making the block usable on larger websites.Testing Instructions