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

JavaScript error when replacing image in Gallery Widget #33171

Closed
piotrbak opened this issue Jul 2, 2021 · 2 comments
Closed

JavaScript error when replacing image in Gallery Widget #33171

piotrbak opened this issue Jul 2, 2021 · 2 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@piotrbak
Copy link

piotrbak commented Jul 2, 2021

Description

When replacing image in Gallery Widget in 5.8-RC1 customizer, there's a JS error happening

Step-by-step reproduction instructions

  1. Go to the customizer
  2. Add a gallery widget with a couple of images
  3. Publish it
  4. Edit one single image and replace it with other from the Media Library
  5. See the error

Expected behaviour

No errors in JS console

Actual behaviour

The following error appeared:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in gallery_image_GalleryImage (created by WithDispatch(gallery_image_GalleryImage))
    in WithDispatch(gallery_image_GalleryImage)
    in Unknown (created by WithSelect(WithDispatch(gallery_image_GalleryImage)))
    in WithSelect(WithDispatch(gallery_image_GalleryImage)) (created by Gallery)
    in li (created by Gallery)

Screenshots or screen recording

image

WordPress information

  • WordPress version: 5.8-RC1
  • Gutenberg version: Not Installed
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome 91.0.4472.124
@talldan talldan added [Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. Needs Testing Needs further testing to be confirmed. labels Jul 5, 2021
@talldan
Copy link
Contributor

talldan commented Jul 5, 2021

Add a gallery widget with a couple of images

@piotrbak Just want to check, is that with the gallery block? It shouldn't be possible to add the gallery widget.

@talldan talldan removed the Needs Testing Needs further testing to be confirmed. label Jul 5, 2021
@talldan
Copy link
Contributor

talldan commented Jul 5, 2021

Oh I see now, I was able to trigger it with the gallery block. It's a React warning, but it doesn't cause any user facing bugs. For some reason the warnings are triggered as errors, that may be for extra visibility.

There's an existing issue to fix these #17355, but it's not a high priority task. There are also some open PRs to refactor the gallery block, so they may result in the issue being resolved.

I'll close this in favour of #17355 and leave a comment there about this.

@talldan talldan closed this as completed Jul 5, 2021
@talldan talldan added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

2 participants