[wp-trac] [WordPress Trac] #52626: wp rest api fails to paginate page requests correctly for parent page dropdown on edit post page when using gutenberg

WordPress Trac noreply at wordpress.org
Tue Feb 23 17:10:15 UTC 2021


#52626: wp rest api fails to paginate page requests correctly for parent page
dropdown on edit post page when using gutenberg
--------------------------+-----------------------------
 Reporter:  hobzhobz      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  5.6.2
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Conditions:

 More than 100 pages.
 Use gutenberg editor.
 Edit a page.

 Result:

 Parent page dropdown is broken / does not contain all pages.

 Expected result:

 Should be able to see all the 100+ pages in the parent page dropdown.

 Reason:

 rest api ajax request only fetches the first 100 pages. The response
 headers does contain the corrent headers:
 X-WP-Total: 1040 (i have 1040 pages)
 X-WP-TotalPages: 11 (yes it's 11 x 100 pages)

 I see only one ajax request for the first 100 pages.
 After that i would see 10 more requests in older versions of wordpress.
 Now it's only one.
 I have tried reading the javascript but it's not easy to read.

 This breaks my companies internal website. Would be nice to have a fix. We
 can't switch away from gutenberg.

 This is also related to an older unfixed bug:
 https://core.trac.wordpress.org/ticket/46294

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52626>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list