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

Errors when/after trashing content with empty image

    Details

      Description

      Steps to reproduce:
      1. Create an empty image
      2. Edit it once again and publish (do not specify any image).
      3. Remove image to trash.

      An error message is displayed in logs:

      [ Jun 25 2014 12:30:14 ] [127.0.0.1] eZFileHandler::link:
      Cannot link to file , it does not exist
      [ Jun 25 2014 12:30:14 ] [127.0.0.1] eZFileHandler::copy:
      Unable to open source file  in read mode
      

      1. Restore the image
        An exception is thrown when viewing the image:

        Argument '$path' is invalid: Storage directory 'var/ezdemo_site/storage' not found in Image1.

      Further Notes:

      After "trashing" the object, the image attribute (for the published version 2) on the database seems wrong. instead of empty file, it now contains:

      <?xml version="1.0" encoding="utf-8"?>
      <ezimage serial_number="1" is_valid="" filename="c992d69f74dcf51ff04a051ef0d93d6b." suffix="" basename="c992d69f74dcf51ff04a051ef0d93d6b" dirpath="/trashed" url="/trashed/c992d69f74dcf51ff04a051ef0d93d6b." original_filename="" mime_type="" width="" height="" alternative_text="" alias_key="1293033771" timestamp="1393596398"><original attribute_id="628" attribute_version="1" attribute_language="eng-GB"/></ezimage>
      

      After restoring it:

      <?xml version="1.0" encoding="utf-8"?>
      <ezimage serial_number="1" is_valid="" filename="mem2-mem1." suffix="" basename="mem2-mem1" dirpath="" url="mem2-mem1." original_filename="" mime_type="" width="" height="" alternative_text="" alias_key="1293033771" timestamp="1393596398"><original attribute_id="628" attribute_version="1" attribute_language="eng-GB"/></ezimage>
      

        Issue Links

          Activity

          Show
          Joao Inacio (Inactive) added a comment - Possible fix PR: https://github.com/ezsystems/ezpublish-legacy/pull/939
          Show
          Bertrand Dunogier added a comment - PR #939 merged to master @ https://github.com/ezsystems/ezpublish-legacy/commit/f606623580976bc6b770f09cdab16e96f7ecef14 .
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved by Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved by Q.A.

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: