Make WordPress Core

Opened 3 months ago

Last modified 2 weeks ago

#62453 new defect (bug)

Cropping of images in WP 6.7 is broken

Reported by: axelkratel's profile axelkratel Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.7.1
Component: Media Keywords: reporter-feedback
Focuses: Cc:

Description

When cropping an image, the original crop isn't retained. The selection moves all the way to the left of the image no matter what the user tried to select. It jumps by itself to 0,0 start point when saving. That seems to be because the starting coordinates get filled with 0,0 even though the user doesn't enter anything and even if the user manually moves the cropping rectangle, the starting coordinates don't get updated. This didn't work that way in 6.6.2. Manually changing the starting coordinates leads to all kinds of strange unpredictable behavior.

The cropping is essentially unusable. I can add quicktime screen capture of problem. I did check logs for errors and console for errors, found no errors.

Independent of plugins or theme.

Error in Chrome dev tools says incorrect use for label.

Attachments (2)

6.7.1.png (387.9 KB) - added by siliconforks 2 months ago.
Cropping in WordPress 6.7.1. Note that the "Starting Coordinates" remain at 0.
6.6.2.png (388.4 KB) - added by siliconforks 2 months ago.
Cropping in WordPress 6.6.2. Note that the "Starting Coordinates" are automatically updated.

Download all attachments as: .zip

Change History (11)

#1 @umeshsinghin
3 months ago

Hi Axelkratel,

Could you pls share more details along with a screenshot? I couldn't replicate the issue. Also, kindly share the Chrome version you are using.

#2 @poena
3 months ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.7
  • PHP: 8.1.29
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
  • Browser: Chrome 131.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. I can not reproduce the bug.

Can you include any more information? What is the image format? Are there any JavaScript errors?

I did not understand what this means: "even though the user doesn't enter anything "
I don't see any input fields to manually change the values. What did you try to update? I mean, during testing, are you changing the CSS transform in the browser console? I am just trying to understand.

#3 @priyankkpatel
3 months ago

I, too tested it with WordPress 6.7 and it is working well.

#4 @desrosj
3 months ago

  • Component changed from General to Media
  • Keywords reporter-feedback added

#5 @holafreak
2 months ago

  • Version changed from 6.7 to 6.7.1

I got the exact same issue on 6.7.1.

#6 @siliconforks
2 months ago

Cropping definitely seems quite glitchy/broken in version 6.7.

Since several people have had trouble reproducing this, here are more detailed steps:

  1. In the admin section, click "Media".
  2. Click on an image. (Upload an image first if you don't have one.)
  3. Click the "Edit Image" button.
  4. Click the "Crop" button.
  5. Click and drag on the drag handle in the top left corner of the image, dragging the mouse somewhere in the middle of the image.
  6. Observe that the fields labeled "Selection" are automatically updated when dragging; however, the fields labeled "Starting Coordinates" are not automatically updated, but remain at zero.

If you try the above steps in WordPress 6.6.2, the "Starting Coordinates" are automatically updated to show the position of the top left corner of the selection.

I'm not sure if that's the only thing wrong with the cropping functionality in 6.7, but it's certainly a regression compared to 6.6.

@siliconforks
2 months ago

Cropping in WordPress 6.7.1. Note that the "Starting Coordinates" remain at 0.

@siliconforks
2 months ago

Cropping in WordPress 6.6.2. Note that the "Starting Coordinates" are automatically updated.

#7 @webby75
2 months ago

I confirm that I have the exact same issue.
The crop feature works in version 6.6.2, but it no longer works starting from version 6.7.0.

On my side, I encounter the bug when using the "selection" fields and moving the selection area. When I click on "Apply crop" button, the cropped area saved is not the one I selected; it defaults to the top-left corner of the image.

Last edited 2 months ago by webby75 (previous) (diff)

#8 @charlesbrown1x
3 weeks ago

Sounds frustrating! Maybe look for any script conflicts or browser-related quirks causing the coordinates issue—it's like trying to fix window cleaning serviceshttps://windowinstallationservices.co.uk/ where the tools just don’t behave as expected.

#9 @Three_Star_Dave
2 weeks ago

Confirming I have the same issue in 6.7.1.

I can work around it by first dragging in the image the crop markers to show the crop area I want, and then manually inputting the starting coordinates (as soon as I enter those fields the crop snaps to the upper left-hand corner, coordinate 0,0), testing and narrowing them down until they move the crop area to the actual location I am looking for.

So that works, but the behavior is clearly incorrect.

Note: See TracTickets for help on using tickets.