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 block: cropping without making any changes leads to an error #65383

Closed
annezazu opened this issue Sep 16, 2024 · 2 comments · Fixed by #65384
Closed

Image block: cropping without making any changes leads to an error #65383

annezazu opened this issue Sep 16, 2024 · 2 comments · Fixed by #65384
Assignees
Labels
[Block] Image Affects the Image Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Sep 16, 2024

Using WordPress 6.6.2 and Gutenberg 19.2 (here's a link to a playground instance), if you add an image block and use the toolbar option to crop the image but don't make any changes, when you hit apply an error appears:

image.bug.mov

To replicate:

  1. Add an image block.
  2. Add an image.
  3. Select the option to crop the image in the toolbar.
  4. Don't make any changes.
  5. Hit "Apply".
  6. See error "Could not edit image. Invalid parameter(s): modifiers"
@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Image Affects the Image Block labels Sep 16, 2024
@andrewserong andrewserong self-assigned this Sep 17, 2024
@andrewserong
Copy link
Contributor

I can reproduce this. I think it should be a pretty simple fix to cancel out / skip performing the API request if there's nothing to modify.

@andrewserong
Copy link
Contributor

Potential fix: #65384

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 [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants