Details
-
Bug
-
Resolution: Fixed
-
High
-
4.7.0, 5.0, 5.1, 5.2, 5.3
-
Castor Core S2
Description
For content objects with multiple image attributes, multiple translations, and multiple versions,
each time a version is removed it will perform a very large ammount of queries related to removal of image aliases.
Sample case:
An object with 20 image attributes, in 20 translations will have 400 image attributes per version, 8000 total.
When removing an object version, the image attributes will be removed, which will cause the imagealiashandler to remove
the aliases.
For each attribute, for each alias, it will query every single of the existing aliases (8000) in order to re-add it to the table if necessary.
This causes many thousands of queries for each version, which will in turn cause a timeout, for example, when publishing new content.
For reference, the eZImageFile::appendFilepath() function seems responsible for 90%+ of the queries/time to remove an object version.
Steps to reproduce:
- Setup 10 languages
- Create a class with 5 image attributes, untranslatable.
- Create a new object of that class in default language, upload image files
- Now add a new version for each language, based on the default 'eng-GB'
( activating debug redirection is recommended ) - create a copy of the object.
- on the copied object, start to edit a new version
Result:
As the new version (11) will go above the default version history limit, old versions will be removed, and a large number of sql queries will be generated
Attachments
Issue Links
- relates to
-
EZP-21324 Images for original object lost when editing copies
- Closed
-
EZP-23152 deleteVersion removes images from published version
- Closed
-
EZP-22615 Not possible to remove an image from an object
- Closed
-
EZP-23207 Alternative text field of an image attribute is not updated unless the file field is updated.
- Closed
-
EZP-23213 removing old image versions causes exponential slowness in proportion of content size
- Closed
- links to