Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery block: adding/editing additional gallery blocks clears existing galleries #30104

Closed
metabreakr opened this issue Jan 10, 2019 · 40 comments
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg [Type] Bug

Comments

@metabreakr
Copy link

In pages that have multiple gallery blocks, editing or adding a gallery will clear out all other galleries in that page. This also can occur when adding images to the Media Library while creating a new gallery block.

Please note: I have also seen this issue (#1708002-zen) where a user simply tries to edit an existing gallery. The Media Library briefly appears, and then all gallery blocks are empty again. Animated GIF below.

Steps to reproduce

  1. Add Page
  2. Add a gallery block (or two)
  3. Add another gallery block, this time inserting new images into the Media Library
  4. Click on Insert (or Cancel), and notice the existing gallery blocks have been cleared of their images

What I expected

I expected to be able add multiple gallery blocks, and edit existing blocks, so that my page contains multiple galleries.

What happened instead

The existing gallery blocks in the Page were all cleared of their content. The blocks remained, just not the images (except for the new block).

Browser / OS version

  • OS: macOS 10.14.2
  • Browser: Chrome
  • Version: 71.0.3578.98

Screenshot / Video

Context / Source

Bug was discovered by: #manual-testing, #user-report

@simison
Copy link
Member

simison commented Jan 11, 2019

@rodrigoi I'm assuming the fix is going to be in how Calypso-Gutenberg handles media and thus if Tiled Gallery block (or future Slider block) are affected, they'll get fixed at the same time?

@rodrigoi
Copy link
Contributor

@simison everything seems to point to a problem on the media library itself, so hopefully yes, there will be a single fix for every block with a media dependency 😉

@arcangelinis
Copy link

I am seeing this issue on #1708591-zen it appears too.

GIF: https://cld.wthms.co/wDJExO

@mdrockwell
Copy link

Another report of this here: #1712989-zen.

@mishivee
Copy link

Another report can be seen at #1713278-zen.

@metabreakr
Copy link
Author

Another report here: #1715066-zen

@mdrockwell
Copy link

Another report here: #1717379-zen

@mmtr
Copy link
Member

mmtr commented Jan 15, 2019

I wonder if this is related to #29791

@rodrigoi
Copy link
Contributor

@mmtr I've been sitting on this for a few days trying to work out options to save the code from #29791, because as you pointed out, it's not only related, it is the source of the problem.

I think we have overengineered the problem a bit, and we don't really need to refresh all the blocks when something changes on the media. I think we can safely remove that code and live with blocks preserving deleted images.

We are moving away from Gutenlypso and this is not a problem with Calypsoify, we can leave this on the backlog.

What do you think?

@mmtr mmtr self-assigned this Jan 17, 2019
@mmtr
Copy link
Member

mmtr commented Jan 17, 2019

@rodrigoi We're not updating all the blocks, we're just updating the ones containing changed images so I think that the source of the problem is something else, probably related to the fact that we have 2 different stores handling the media (Calypso and Core) and they're not sync.

In any case and since we're moving away from Gutenlypso I agree that we can remove that code and live with blocks preserving the images.

@mmtr mmtr removed their assignment Jan 22, 2019
@AMcGrady
Copy link

Tested this on a user site and I can now add or edit multiple Galleries on a page or post without the galleries going blank. Is it safe to assume this issue is resolved?

@edwinho89
Copy link

I was testing this on user's site on #1708591-zen, on the page named "Completed Projects" and are able to reproduce this.

@brezocordero
Copy link

Another report: 1754419-zen

@KokkieH
Copy link
Contributor

KokkieH commented Jan 30, 2019

Another report from the forums

Affected page: https://palmos.info/photos-playback-%cf%88/

@drwpcom
Copy link

drwpcom commented Jan 30, 2019

Another report in #9835814-hc

@KokkieH
Copy link
Contributor

KokkieH commented Jan 31, 2019

A report from the forums

@lakellie
Copy link

Another report in #1755586-zen reproduced on their test draft "Gallery Testing"

@KristinaKay
Copy link

Another report here #1770830-zen

@zdenys
Copy link
Contributor

zdenys commented Feb 6, 2019

Another user reported this in #9567432-HC. I was able to reproduce it on my site (by copying user's content): http://cld.wthms.co/zTo4AD

@lakellie
Copy link

lakellie commented Feb 6, 2019

Another user reported in #1759009-zen

@samiff
Copy link
Contributor

samiff commented Feb 8, 2019

Another report for simple site in #1787750-zen

@khristiansnyder
Copy link

Another report for a simple site using Firefox: #3394182-hc
A workaround is to use a Classic Block and add a gallery within it.

@aleone89
Copy link

Another report in 1803107-zen

As above, suggested keeping the galleries in a classic block.

@donalirl
Copy link

Two more cases: #1810291-zen and #1810276-zen

@mdrockwell
Copy link

Another report here: 10063254-hc

@lakellie
Copy link

Another report in 1820175-zen

@mdrockwell
Copy link

Another report in 10676047-hc

@tanjoymor
Copy link

Returning user regarding this issue looking for an update 1826270-zen (original 1803107-zen)

@drwpcom
Copy link

drwpcom commented Feb 24, 2019

Another report of this in #1791348-zen. The user said that the gallery is removed when using old images but not new ones.

Videos submitted by user:
Creating new post with gallery (of old photos) and adding image (shows bug)
https://youtu.be/YcT4orV3ejU

And then the same process with recent photos (no bug)
https://youtu.be/FJMRUhTImrU

@sophiegyo
Copy link

I have another user who reported the problem in #10653491-hc

Page in question:
/tour-salzburg-nach-bad-gastein/

@metabreakr
Copy link
Author

Another: 1833694-zen

@rezzap
Copy link

rezzap commented Mar 2, 2019

Another report in 1838588-zen

@thebud15
Copy link

thebud15 commented Mar 4, 2019

Reported in 9497905-hc

@drwpcom
Copy link

drwpcom commented Mar 4, 2019

Another report in #1842633-zen

@AtrumGeost
Copy link
Contributor

Another report here: 10898256-hc

@tanjoymor
Copy link

Another report here: 1849325-zen

@rodrigoi
Copy link
Contributor

Thanks everyone for the patience. This should have been fixed when we deployed #31196. Please reopen if there's another report.

@drwpcom
Copy link

drwpcom commented Mar 14, 2019

Hurrah! Thanks for the update @rodrigoi!

@zdenys
Copy link
Contributor

zdenys commented Oct 1, 2019

Another report in 2385061-zen. Pre-existing images in a Gallery Block become un-checked when adding new images to the same Gallery and hence become missing.

@zdenys zdenys reopened this Oct 1, 2019
@gwwar
Copy link
Contributor

gwwar commented Oct 26, 2019

I'm having trouble breaking the Gallery block, closing this issue since the original problem was fixed.

@zdenys if you're still seeing this behavior do you mind filing a fresh issue with steps, or a quick screenshot or video for more hints on reproducing?

@gwwar gwwar closed this as completed Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg [Type] Bug
Projects
None yet
Development

No branches or pull requests