[wp-trac] [WordPress Trac] #50105: Remove infinite scrolling behavior from the Media grid

WordPress Trac noreply at wordpress.org
Fri Aug 6 12:31:06 UTC 2021


#50105: Remove infinite scrolling behavior from the Media grid
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |       Owner:  joedolson
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  5.8
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-screenshots needs-   |     Focuses:  ui, accessibility,
  testing needs-dev-note             |  javascript
-------------------------------------+-------------------------------------

Comment (by herregroen):

 The fix for this ticket seems to have introduced a backwards-incompatible
 change to the `query-attachments` ajax action.

 Previously it wasn't required to send a `posts_per_page` variable. Now not
 sending this causes a division by 0 to happen.

 Note that not passing it causes it to fallback to the global option but
 this is done on the `query_vars` property of the query and not on the
 `query` property which would still contain the originally passed
 parameters.

 In this fix the `query` property is used to determine the total pages
 which may not have the `posts_per_page` set at all.

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


More information about the wp-trac mailing list