Problem/Motivation
The code tries to access non-existent properties $field->width and $field->height. While the $field variable exists, it doesn't have these properties accessible in this context, causing focal point position exported as (0, 0)
The code performs unnecessary conversions between absolute and relative coordinates using absoluteToRelative() during export and saveCropEntity() during import. These conversions are only needed for UI rendering, not for data storage.
Proposed resolution
1. Remove problematic width/height access: Remove references to `$field->width` and `$field->height` which don't exist in the current context.
2. Simplify coordinate handling:
- During export: Remove the absoluteToRelative() conversion and directly store the raw x and y coordinates from the crop entity
- During import: Use setPosition() directly with the absolute coordinates instead of saveCropEntity()
Issue fork single_content_sync-3549686
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
undertext commentedComment #4
rolodmonkey commentedI had this issue and the patch fixed it for me.
Comment #6
nginex commentedThis is now available in new release 1.4.14