[wp-trac] [WordPress Trac] #52626: Block editor doesn't paginate parent page results

WordPress Trac noreply at wordpress.org
Sun Apr 24 11:09:45 UTC 2022


#52626: Block editor doesn't paginate parent page results
--------------------------+------------------------------
 Reporter:  hobzhobz      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.6.2
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by hobzhobz):

 Replying to [comment:6 axdr]:
 > Too many records in the drop-down list will make it impossible to use
 it.
 >
 > No need to solve this problem by outputing the headings of all pages.
 > Perhaps someone can solve it using the menu-order field.

 It's already sorted by menu_order.
 You know what happens if menu_order is 0 on all pages? Undefined behavior.
 You know what that means? It means that they come in seemingly random
 order. Do you know what that means when doing pagination? It means that
 page 1 has 100 random pages. Page 2 has 100 random pages. Did you know
 that this means that the same page can come on page 1 and page 2? Yes it
 can.
 You need to sort on menu_order AND a secondary parameter. Something like
 ID perhaps.

 BAD: order by menu_order limit 0,100
 GOOD: order by meny_order, ID limit 0,100

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


More information about the wp-trac mailing list