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 + Link to = Crop images doesn't work in the editor #56286

Closed
gyurmey2 opened this issue Nov 18, 2023 · 2 comments
Closed

Gallery Block + Link to = Crop images doesn't work in the editor #56286

gyurmey2 opened this issue Nov 18, 2023 · 2 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended

Comments

@gyurmey2
Copy link

Description

Crop images doesn't work in the editor if you choose linking to Attachemnt Page or Media File.

Step-by-step reproduction instructions

  1. Add a gallery block
  2. Add images (preferably of different proportions)
  3. Select Crop images
  4. Select Link to Attachemnt Page or Media File

Screenshots, screen recording, code snippet

at

Environment info

  • WP: 6.4.1
  • Theme: 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

@gyurmey2 gyurmey2 added the [Type] Bug An existing feature does not function as intended label Nov 18, 2023
@jordesign jordesign added Needs Testing Needs further testing to be confirmed. [Block] Gallery Affects the Gallery Block - used to display groups of images labels Nov 19, 2023
@michalczaplinski
Copy link
Contributor

michalczaplinski commented Nov 20, 2023

I can't seem to replicate this with TT4 & 6.4.1. Which version of the Gutenberg plugin are you running?

Screen.Recording.2023-11-20.at.19.53.48.mov

@michalczaplinski michalczaplinski added the [Status] Needs More Info Follow-up required in order to be actionable. label Nov 20, 2023
@t-hamano
Copy link
Contributor

I was able to reproduce this problem with WordPress6.4, but not with the latest version of Gutenberg.

92aec9be871263b6b8d245cc2938141a.mp4

My guess is that #56043 may have unintentionally solved this problem. Due to #56043, the HTML of the Image block in the Gallery block has changed as follows.

WordPress 6.4

<figure class="wp-block-image">
	<a>
		<div>
			<img />
		</div>
	</a>
	<figcaption></figcaption>
</figure>

Latest Gutenberg trunk

<figure class="wp-block-image">
	<div>
		<a>
			<img />
		</a>
	</div>
	<figcaption></figcaption>
</figure>

@gyurmey2 I would like to close this issue as I believe it has been resolved.

This fix will be part of Gutenberg plugin 17.2. It hasn't been released yet, but please give it a try once it's released.

@t-hamano t-hamano added [Block] Image Affects the Image Block and removed [Status] Needs More Info Follow-up required in order to be actionable. Needs Testing Needs further testing to be confirmed. labels Nov 21, 2023
@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
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 [Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants