[wp-trac] [WordPress Trac] #52789: Gallery layout block adds all media items when changing an image

WordPress Trac noreply at wordpress.org
Fri Mar 12 14:01:14 UTC 2021


#52789: Gallery layout block adds all media items when changing an image
--------------------------+---------------------
 Reporter:  MikeLittle    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.7.1
Component:  Editor        |     Version:  5.7
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------
Changes (by desrosj):

 * keywords:   => needs-patch
 * component:  General => Editor
 * milestone:  Awaiting Review => 5.7.1


Comment:

 Good catch on this one!

 I did some testing, and looks like this is reproducible in `trunk` as
 well. However, it only happens if the original two images are in the
 gallery. For example, if you replace one of the images and then click
 Media Library as seen in the video, the issue does not occur.

 My hunch is that it has something to do with both IDs being `null` in the
 block definition (`<!-- wp:gallery
 {"ids":[null,null],"linkTo":"none","align":"wide"} -->` is what is
 inserted).

 Some other things I noticed:
 - If you replace one of the default images and then add to the gallery, it
 only shows two images in the media modal when there are actually three.
 - After clicking on an image in the gallery and clicking the edit pencil
 in the top right, the buttons and links within the highlighted area cannot
 be selected.

 This will probably need an issue over on GitHub, but leaving this open for
 now for visibility.

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


More information about the wp-trac mailing list