Details
-
Bug
-
Resolution: Fixed
-
High
-
4.3.0, 4.4.0, 4.5.0beta2
-
None
Description
When restoring from trash an object with image attribute that has more than one version, the image aliases are not restored, and the filesystem gets bloated with multiple "trashed" folders and multiple hard links to the same file.
In my case it created more than 7000 hard links to the same file!
P.S. This is probably a bug in kernel/classes/datatypes/ezimage/ezimagetype.php, trashStoredObjectAttribute() function, because it's the only place where the "trashed" folder is mentioned.
Steps to reproduce
- create some object that has an image attribute, upload an image in the attribute and publish it
- reedit the object and change something that doesn't change the objects name
- move the object to trash - here's the first bug, "medium" alias version of the image is not removed
- restore the object from trash
The result is:
- the "trashed" folder that was created when moving the object to trash is not deleted
- the image and it's alias versions are not restored back to the version's folder of the image
(in admin the image url points to a non-existing image)
- the files structure gets like this:
storage/images/trashtest/59884-1-cro-HR |- trashed | |- 6da0f711bb05c3241d5e4ddc8f577387.jpg | |- 6da0f711bb05c3241d5e4ddc8f577387_large.jpg | |- 6da0f711bb05c3241d5e4ddc8f577387_reference.jpg | |- 6da0f711bb05c3241d5e4ddc8f577387_medium.jpg | |- d587555b48b3567d9828c80922ffa69e_medium.jpg | |- trashed/ | |- 66cd89c1e9779c08419bd87f5f5f5d50_medium.jpg |- trashtest_medium.jpg
Attachments
Issue Links
- duplicates
-
EZP-16823 eZ Publish creates enormous trashed-data on deleting files when using ezdbfile
- Closed
- relates to
-
EZP-14983 Files are still available when object is moved to trash [patch]
- Closed
-
EZP-18594 Moving content object within datatype ezimage to trash causing DB Transaction error.
- Closed
-
EZP-18863 Place removetrashedimages.php in bin/php?
- Closed
-
EZP-16676 Hard links used for image aliases can lead to severe data loss in image storage
- Closed
-
EZP-18785 On Cluster DFS Images aren't moved to trash folder
- Closed