Details
-
Bug
-
Resolution: Fixed
-
High
-
4.6.0, 4.7.0, 5.0, 5.1, 5.2
Description
When removing an archived version of a copy of an image object, the image file is removed from it's original location.
Steps to reproduce:
- Create and publish an image object
- Edit the object once more, and publish without modifying the image.
The files are stored in var/siteaccess/storage/images/ <original_path> / - Create a copy of the image object
New files are created for the copy in var/siteaccess/storage/images/ <copy_path> / - On this copy, delete version 1 of the object (manage versions, check '1', remove selected)
Note that the old version(s) may also be removed automatically when the maximum version history limit is reached.
Looking at the first image path, the original file has been removed.
Further details:
When the object copy is created, only the ezimage attribute for the second version seems to be updated - version 1 still refers to the original object:
version 2 (correct):
<?xml version="1.0" encoding="utf-8"?> <ezimage serial_number="1" is_valid="1" filename="test_image.jpg" suffix="jpg" basename="test_image" dirpath="var/ezflow_site/storage/images/copy/test_image/9994-1-eng-GB" ...
version 1 (refers to the origin object):
<?xml version="1.0" encoding="utf-8"?> <ezimage serial_number="1" is_valid="1" filename="test_image.jpg" suffix="jpg" basename="test_image" dirpath="var/ezflow_site/storage/images/test_image/9994-1-eng-GB" ...
Possible workaround:
Modify [CopySettings]/VersionHandling in content.ini, from 'all' to 'last-published'.
This way, there should be no reference of the original object's image in the new copy.
[CopySettings] # Use either user-defined, last-published or all VersionHandling=last-published
Attachments
Issue Links
- relates to
-
EZP-22402 Image disappears when removing the original of a copied content object
- Closed
-
EZP-22913 Removing version image aliases causes MySQL timeouts due to extremely high amount of queries.
- Closed
- testing discovered
-
EZP-21749 Fatal error when editing content with ezimage
- Closed
- links to