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

Image Lightbox not working on Classic Themes with Gutenberg versions higher than 17.1.x #57370

Closed
liviopv opened this issue Dec 26, 2023 · 2 comments · Fixed by #57396
Closed
Labels
[Block] Image Affects the Image Block [Feature] Script Modules API Related to the Script Modules API that adds support for native ES modules and import maps [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@liviopv
Copy link

liviopv commented Dec 26, 2023

Description

The Image Lightbox is not working on Classic Themes when using Gutenberg versions higher than 17.1.x. In the backend, the Image Block will present the "Expand on click" option, but in the frontend clicking on the image or in the icon to expand it will do nothing. No error is tracked in the browser console.

Switching to a block theme like TT4 or deactivating Gutenberg fixes the issue.

Step-by-step reproduction instructions

  1. Install a Classic Theme
  2. Install Gutenberg with a version higher than 17.1.x (I tested 17.2, 17.2.3 and 17.3)
  3. Add an image to a page/post
  4. Select the option to "Expand on click"
  5. The image lightbox will not open on click

Screenshots, screen recording, code snippet

Video: https://cldup.com/qvnfo5aGOa.mp4 (bigger than 10MB)

Environment info

  • WordPress 6.4
  • GB 17.1, 17.2, 17.2.3, 17.3
  • Twenty Sixteen and TT4

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano
Copy link
Contributor

Thanks for the report.

I was able to reproduce the problem you reported on Twenty Twenty-One. Apparently, the script is no longer loaded on the front end in the case of classic themes. Let's investigate the cause a little more.

@t-hamano t-hamano added [Block] Image Affects the Image Block [Type] Regression Related to a regression in the latest release labels Dec 27, 2023
@t-hamano
Copy link
Contributor

I believe this issue is related to #56143. The possible cause is described in this comment.

@t-hamano t-hamano added the [Feature] Script Modules API Related to the Script Modules API that adds support for native ES modules and import maps label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Script Modules API Related to the Script Modules API that adds support for native ES modules and import maps [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
2 participants