Uploaded image for project: 'Community Platforms'
  1. Community Platforms
  2. COM-20126

ezimagefile keep growing without relation to version

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • None
    • Bundles, Community
    • None

    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

        Activity

          People

            Unassigned Unassigned
            8cca2cc0-9986-4dd7-a749-122c96b3f9b5@accounts.ibexa.co Ousmane KANTE
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: