Skip to content

Page List: Parent control query limit is too small #69608

@wwwFrank

Description

@wwwFrank

Description

The block "page list" can not be used for websites with more than 100 pages.

When editing the page with the "page list" a list of pages is loaded. This list is limited to 100 elements.
Pages at the end of the hierarchy of the website are not available.

Solution 1:

Set the limit to a higher value, 500 may be good.

  if (isset($params['per_page'])) {
    $params['per_page']['maximum'] = 500;
  }

Solution 2:

We have to chose a parent-page but also pages without childs are loaded.
A smarter filter for "pages with childs" will reduce the length of the list.

Step-by-step reproduction instructions

  • Website with more then 100 pages
  • Edit a page
  • insert page list
  • configure page list
  • try to chose a page at the end of the content

Screenshots, screen recording, code snippet

Image

Environment info

WordPress 6.7.2
Theme Blocksy
Gutenberg is not installed
Language German

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DecisionNeeds a decision to be actionable or relevantREST API InteractionRelated to REST API[Block] Page ListAffects the Page List Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions