[wp-trac] [WordPress Trac] #53765: Media Library shows only the selected image

WordPress Trac noreply at wordpress.org
Thu Aug 19 05:01:09 UTC 2021


#53765: Media Library shows only the selected image
--------------------------+------------------------
 Reporter:  benitolopez   |       Owner:  joedolson
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  5.8.1
Component:  Media         |     Version:  5.8
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------

Comment (by peterwilsoncc):

 I did a bisect today, it appears to have been introduced in [50829].

 While testing today, it happens in:

 * classic editor featured image (per image above)
 * classic editor inline image (click edit then replace buttons)
 * block editor classic block inline image (click edit then replace
 buttons)

 With infinite scrolling enabled via `add_filter(
 'media_library_infinite_scrolling', '__return_true' );` the issue doesn't
 happen so I suspect the `get-attachment` action is confusing the logic and
 the load more button isn't displaying as it doesn't have the
 `data.totalAttachments` property.

 I think when replacing an image there ought to be two initial ajax
 requests, one to get the selected attachment and one to get the first page
 of attachments via the `query-attachments` action.

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


More information about the wp-trac mailing list