#53835 closed defect (bug) (worksforme)
Since WordPress 5.8, Add to gallery from Media Library initial link is broken
Reported by: | chadbush | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.8 |
Component: | Gallery | Keywords: | |
Focuses: | ui, administration | Cc: |
Description
I've tested this on a brand-new install of 5.8, with no plugins and the default theme. I've also tested on several other sites, and the bug is consistent.
I'm using the current version of Chrome (92.0.4515.107) on current MacOS (11.5.1).
Expected behavior:
1) Click a Gallery block with images in it. At bottom, click Media Library to add a new image to the gallery from the Media Library.
2) Media Library opens, with the Add to gallery option highlighted at upper left and "Add to gallery" as the title of the modal. Only images that do not exist in the current gallery are shown.
3) Click an image to select it, click Add to gallery at lower right, then click Update gallery and the image is added to the existing gallery.
What the bug is doing instead:
1) Click a Gallery block with images in it. At bottom, click Media Library to add a new image to the gallery from the Media Library.
2) Media Library opens, with the Add to gallery option highlighted at upper left and "Add to gallery" as the title of the modal. However, all images in the Media Library are shown.
3) Click an image to select it, click Add to gallery at lower right, and all the current images in the gallery are removed. Only the image(s) selected are inserted. Click Update Gallery, and the updated gallery contains only the images selected from the Add to gallery modal. All other images have been removed.
This has the effect of instantly destroying the gallery, requiring it to be rebuilt or restored from backup.
Workaround that reveals more detail about the nature of the bug:
Clicking Edit gallery, then clicking Add to gallery again on the upper left of the Media Library modal, resolves the issue. This seems to indicate that the initial link from the Media Library button at the bottom of the Gallery block is the broken piece. It loads the modal for Edit gallery instead of Add to gallery, but that modal is labeled as Add to gallery. I can use this workaround for my own sites, but I can't expect less technically savvy clients to do the same.
Change History (6)
#2
@
3 years ago
- Milestone changed from 5.8.1 to 5.8.2
There's no working fix yet and 5.8.1 RC is due out in less than 24 hours. I'm going to punt this to 5.8.2.
#3
@
3 years ago
- Milestone changed from 5.8.2 to Future Release
There's no working fix yet and 5.8.2 RC is due out in less than 24 hours. I'm going to punt this to a future release.
Welcome and thanks for the report!
The problem was just mentioned on GitHub, too:
https://github.com/WordPress/gutenberg/issues/33769
It may need to be fixed within Gutenberg, but I'm leaving this ticket open as well for more visibility.