-
Bug
-
Resolution: Fixed
-
Neutral
-
2.1
-
None
-
None
SwissRe noticed that from time to time some images are not properly displayed. It seems that this might happen after re-uploading several time the same picture, but by cropping it with an external tool before upload. It has not been found yet how to clearly reproduce the issue, this will be the first part of investigation
Steps to reproduce
- Start a magnolia bundle with dam-focal module installed
- Go to admin central and launch Asset app
- Upload elevate-map-preview.jpg picture you can find attached in the ticket
- Set selection areas of all variant in the second tab to the very bottom right part
- Press Save
- Edit the asset and replace the picture with elevate-map-preview-cropped.jpg by uploading it
- Press Save
- Open the asset and go to focal area tab, the selections look to overflow the pictures, the offset and dimensions look to match the ones from previous bigger picture, if you click on the selection the offsets become negative
Expected results
Offset and dimensions of the areas shall be reset on upload and match the new picture size
Actual results
Offset and dimensions seem to be kept from previous image and offset turns negative when trying to change the area selection
Workaround
Development notes
Reset is indeed done when uploading the picture, but pressing save button after an upload doesn't trigger the code which is actually saving the new areas details in imaging JCR workspace
In FocalAreasFieldConverter l.58, focalAreasBean.getAreas() map is empty when clicking Save after an upload.
In FocalAreasField l. 245 : this.areasBean.getAreas().clear(); => which makes the above map empty