Description
How to check it:
1 - create a content type 'picture' with title (eztring) and picture (ezimage) (you could also use the original existing 'image' content type
2 - create a 'picture content' (upload a new picture) and publish it.
3 - a new row is added to ezimagefile with contentobject_attribute_id and file path
4 - edit that content again, in draft mode a new row is added in ezimagefile table with same filepath. (real use case)
5 - publish the content again without changing the path, a new line is added to ezimagefile table without changing anything in the table.
So every pubished version of the content will create two rows in ezimagefile (except first version). even if the path doesn't change.
Quick fix as proposal:
- look for existing row With (contentobject_attribute_id, path) if there is one, we shouldn't create new One.
I can create a pull request for that, I did a workaround
(better to force have index on the (contentobject_attribute_id, path) so that there can't be a duplicated line on that.
Notice:
Attachments
Issue Links
- duplicates
-
IBX-4001 'ezimagefile' records grow without relation to content's version
- Closed