Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21324

Images for original object lost when editing copies

    Details

      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
      

        Issue Links

          Activity

          Eduardo Fernandes (Inactive) created issue -
          Eduardo Fernandes (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Gunnstein Lye made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Gunnstein Lye made changes -
          Rank Ranked higher
          Gunnstein Lye made changes -
          Priority Medium [ 4 ] High [ 3 ]
          Gunnstein Lye made changes -
          Rank Ranked higher
          Joao Inacio (Inactive) made changes -
          Description - install eZPublish 4.7.0 with ezwebin
          - all settings are set as default

          - publish object with image on version 1 (objectID: 215)

          - image folder and some alias get created:

          var/ezwebin_site/storage/images/new-image/1266-1-eng-GB/:
          total 24
          4354141 -rw-rw-rw- 1 www-data www-data 8188 Jul 22 12:50 new-image.jpg
          4354149 -rw-rw-rw- 1 www-data www-data 7368 Jul 22 12:50 new-image_reference.jpg
          4354150 -rw-rw-rw- 1 www-data www-data 7367 Jul 22 12:50 new-image_small.jpg

          - edit/publish object (10 times) until version used for image upload (1) is deleted due to version history limitation

          - copy object ("new image") to any place on content or media structure (objectID: 216)

          - image folder for new object is created with hard-links to images of original object:

          var/ezwebin_site/storage/images/media/new-image/1266-1-eng-GB/:
          total 40
          4354141 -rw-rw-rw- 2 www-data www-data 8188 Jul 22 12:50 new-image.jpg
          4354172 -rw-rw-rw- 2 www-data www-data 7367 Jul 22 12:54 new-image_large.jpg
          4354151 -rw-rw-rw- 2 www-data www-data 7367 Jul 22 12:52 new-image_medium.jpg
          4354149 -rw-rw-rw- 2 www-data www-data 7368 Jul 22 12:50 new-image_reference.jpg
          4354150 -rw-rw-rw- 2 www-data www-data 7367 Jul 22 12:50 new-image_small.jpg

          - edit copied object (objectID: 216) and upload a new replacement image (edit version: 12)
          - image folder for recently uploaded image is created:

          var/ezwebin_site/storage/images/media/new-image/1270-12-eng-GB/:
          total 152
          4354181 -rw-rw-rw- 1 www-data www-data 72046 Jul 22 12:58 new-image.png
          4354122 -rw-rw-rw- 1 www-data www-data 72043 Jul 22 12:58 new-image_reference.png
          4354182 -rw-rw-rw- 1 www-data www-data 7362 Jul 22 12:58 new-image_small.png

          - edit/publish copied object (objectID: 216) until version 20 is created
          - check that folder for images of original object has been removed!

          ls: cannot access var/ezwebin_site/storage/images/new-image/1266-1-eng-GB/: No such file or directory
          When removing an archived version of a copy of an image object, the image file is removed from it's original location.

          h5. 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)

          Looking at the first image path, the original file has been removed.

          h5. 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):
          {code}
          <?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" ...
          {code}

          version 1 (refers to the origin object):
          {code}
          <?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" ...
          {code}
          Joao Inacio (Inactive) made changes -
          Affects Version/s 4.6.0 [ 11005 ]
          Joao Inacio (Inactive) made changes -
          Fix Version/s 4.7.0 [ 11010 ]
          Joao Inacio (Inactive) made changes -
          Description When removing an archived version of a copy of an image object, the image file is removed from it's original location.

          h5. 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)

          Looking at the first image path, the original file has been removed.

          h5. 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):
          {code}
          <?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" ...
          {code}

          version 1 (refers to the origin object):
          {code}
          <?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" ...
          {code}
          When removing an archived version of a copy of an image object, the image file is removed from it's original location.

          h5. 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.

          h5. 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):
          {code}
          <?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" ...
          {code}

          version 1 (refers to the origin object):
          {code}
          <?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" ...
          {code}
          Joao Inacio (Inactive) made changes -
          Description When removing an archived version of a copy of an image object, the image file is removed from it's original location.

          h5. 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.

          h5. 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):
          {code}
          <?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" ...
          {code}

          version 1 (refers to the origin object):
          {code}
          <?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" ...
          {code}
          When removing an archived version of a copy of an image object, the image file is removed from it's original location.

          h5. 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.

          h5. 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):
          {code}
          <?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" ...
          {code}

          version 1 (refers to the origin object):
          {code}
          <?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" ...
          {code}


          h5. 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.
          {code}
          [CopySettings]
          # Use either user-defined, last-published or all
          VersionHandling=last-published
          {code}
          Patrick Allaert (Inactive) made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee Patrick Allaert [ patrick.allaert@ez.no ]
          Patrick Allaert (Inactive) made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 3 hours, 24 minutes [ 12240 ]
          Worklog Id 37738 [ 37738 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 3 hours, 24 minutes [ 12240 ] 3 hours, 54 minutes [ 14040 ]
          Worklog Id 37739 [ 37739 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 3 hours, 54 minutes [ 14040 ] 4 hours, 4 minutes [ 14640 ]
          Worklog Id 37931 [ 37931 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 4 hours, 4 minutes [ 14640 ] 4 hours, 34 minutes [ 16440 ]
          Worklog Id 38344 [ 38344 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 4 hours, 34 minutes [ 16440 ] 1 day, 3 hours, 34 minutes [ 41640 ]
          Worklog Id 39798 [ 39798 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 1 day, 3 hours, 34 minutes [ 41640 ] 2 days, 3 hours, 34 minutes [ 70440 ]
          Worklog Id 39799 [ 39799 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 2 days, 3 hours, 34 minutes [ 70440 ] 3 days, 3 hours, 34 minutes [ 99240 ]
          Worklog Id 39800 [ 39800 ]
          Patrick Allaert (Inactive) made changes -
          Time Spent 3 days, 3 hours, 34 minutes [ 99240 ] 4 days, 1 hour, 19 minutes [ 119940 ]
          Worklog Id 39801 [ 39801 ]
          Patrick Allaert (Inactive) made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Patrick Allaert (Inactive) made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Fix Version/s 4.6 Maintenance [ 12584 ]
          Fix Version/s 4.7 Maintenance [ 12583 ]
          Fix Version/s 5.0 Maintenance [ 11287 ]
          Fix Version/s 5.1 Maintenance [ 12301 ]
          Fix Version/s 5.2-rc1 [ 12781 ]
          Patrick Allaert (Inactive) made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Filipe Dobreira (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Patrick Allaert [ patrick.allaert@ez.no ] Filipe Dobreira [ filipe.dobreira@ez.no ]
          Paulo Nunes (Inactive) made changes -
          Rank Ranked higher
          Filipe Dobreira (Inactive) made changes -
          Status QA [ 10008 ] InputQ [ 10001 ]
          Assignee Filipe Dobreira [ filipe.dobreira@ez.no ]
          André Rømcke made changes -
          Rank Ranked lower
          Bertrand Dunogier made changes -
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Bertrand Dunogier made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Bertrand Dunogier made changes -
          Link This issue testing discovered EZP-21749 [ EZP-21749 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezpublish-legacy#792 (Web Link)" [ 12752 ]
          Bertrand Dunogier made changes -
          Remote Link This issue links to "PR ezpublish-legacy#825 (Web Link)" [ 12812 ]
          Bertrand Dunogier made changes -
          Time Spent 4 days, 1 hour, 19 minutes [ 119940 ] 4 days, 7 hours, 19 minutes [ 141540 ]
          Worklog Id 41932 [ 41932 ]
          Bertrand Dunogier made changes -
          Time Spent 4 days, 7 hours, 19 minutes [ 141540 ] 1 week, 5 hours, 19 minutes [ 163140 ]
          Worklog Id 41933 [ 41933 ]
          Bertrand Dunogier made changes -
          Time Spent 1 week, 5 hours, 19 minutes [ 163140 ] 1 week, 1 day, 2 hours, 19 minutes [ 181140 ]
          Worklog Id 41935 [ 41935 ]
          Bertrand Dunogier made changes -
          Time Spent 1 week, 1 day, 2 hours, 19 minutes [ 181140 ] 1 week, 1 day, 7 hours, 19 minutes [ 199140 ]
          Worklog Id 41936 [ 41936 ]
          Bertrand Dunogier made changes -
          Time Spent 1 week, 1 day, 7 hours, 19 minutes [ 199140 ] 1 week, 2 days, 4 hours, 19 minutes [ 217140 ]
          Worklog Id 41937 [ 41937 ]
          Bertrand Dunogier made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Bertrand Dunogier made changes -
          Time Spent 1 week, 2 days, 4 hours, 19 minutes [ 217140 ] 1 week, 3 days, 19 minutes [ 231540 ]
          Worklog Id 42098 [ 42098 ]
          Bertrand Dunogier made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Bertrand Dunogier made changes -
          Time Spent 1 week, 3 days, 19 minutes [ 231540 ] 1 week, 3 days, 2 hours, 19 minutes [ 238740 ]
          Worklog Id 42102 [ 42102 ]
          Bertrand Dunogier made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Affects Version/s 5.1 [ 11280 ]
          Affects Version/s 5.0 [ 10300 ]
          Affects Version/s 5.2 [ 12582 ]
          Component/s Content (images, XML, PDF, RSS, etc.) [ 10789 ]
          Fix Version/s 5.2 Maintenance [ 12782 ]
          Fix Version/s 5.2-rc1 [ 12781 ]
          Joao Pingo (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ] Joao Pingo [ joao.pingo@ez.no ]
          Joao Pingo (Inactive) made changes -
          Time Spent 1 week, 3 days, 2 hours, 19 minutes [ 238740 ] 1 week, 3 days, 3 hours, 49 minutes [ 244140 ]
          Worklog Id 42128 [ 42128 ]
          Joao Pingo (Inactive) made changes -
          Worklog Id 42128 [ 42128 ]
          Joao Pingo (Inactive) made changes -
          Time Spent 1 week, 3 days, 3 hours, 49 minutes [ 244140 ] 1 week, 3 days, 6 hours, 49 minutes [ 254940 ]
          Worklog Id 42179 [ 42179 ]
          Joao Pingo (Inactive) made changes -
          Assignee Joao Pingo [ joao.pingo@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Joao Pingo (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Joao Pingo (Inactive) made changes -
          Time Spent 1 week, 3 days, 6 hours, 49 minutes [ 254940 ] 1 week, 4 days, 2 hours, 49 minutes [ 269340 ]
          Worklog Id 42201 [ 42201 ]
          Joao Pingo (Inactive) made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Petar Spanja (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Petar Spanja (Inactive) made changes -
          Time Spent 1 week, 4 days, 2 hours, 49 minutes [ 269340 ] 1 week, 4 days, 4 hours, 19 minutes [ 274740 ]
          Worklog Id 42355 [ 42355 ]
          Petar Spanja (Inactive) made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Eduardo Fernandes (Inactive) made changes -
          Link This issue relates to EZP-22402 [ EZP-22402 ]
          Joao Inacio (Inactive) made changes -
          Link This issue relates to EZP-22913 [ EZP-22913 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 56967 ] EZ* Development Workflow [ 84075 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 84075 ] EZEE Development Workflow [ 122710 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Eduardo Fernandes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 4 days, 4 hours, 19 minutes
                1w 4d 4h 19m