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

Error 500 when deleting a version with a filled Image field

    XMLWordPrintable

    Details

      Description

      A DELETE request to remove a version fails with a 500 status if the version has an Image field filled with an image.

      curl -i 'http://ezpublish5.loc/api/ezp/v2/content/objects/246/versions/33' -H 'X-CSRF-Token: UqA6fBtxRMBrgVA62KFSAIjt7TrkLewXC8CJaE3vP6A' -H 'Cookie: eZSESSID=0ibjki8j1pru4t1atr400seig7; is_logged_in=true'
      
      HTTP/1.1 500 Internal Server Error
      Date: Tue, 09 Dec 2014 10:55:47 GMT
      Content-Type: application/vnd.ez.api.ErrorMessage+xml
      
      <?xml version="1.0" encoding="UTF-8"?>
      <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml">
       <errorCode>500</errorCode>
       <errorMessage>Internal Server Error</errorMessage>
       <errorDescription>Warning: pathinfo() expects parameter 1 to be string, object given in /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Imagine/IORepositoryResolver.php line 146</errorDescription>
       <trace>#0 [internal function]: Symfony\Component\Debug\ErrorHandler-&gt;handle(2, 'pathinfo() expe...', '/home/dp/dev/ez...', 146, Array)
      #1 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Imagine/IORepositoryResolver.php(146): pathinfo(Object(eZ\Publish\Core\IO\Values\BinaryFile))
      #2 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Imagine/IORepositoryResolver.php(121): eZ\Bundle\EzPublishCoreBundle\Imagine\IORepositoryResolver-&gt;getFilePath(Object(eZ\Publish\Core\IO\Values\BinaryFile), 'reference')
      #3 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Imagine/AliasCleaner.php(29): eZ\Bundle\EzPublishCoreBundle\Imagine\IORepositoryResolver-&gt;remove(Array, Array)
      #4 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/ezpublishDevDebugProjectContainer.php(42335): eZ\Bundle\EzPublishCoreBundle\Imagine\AliasCleaner-&gt;removeAliases(Object(eZ\Publish\Core\IO\Values\BinaryFile))
      #5 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/Image/ImageStorage.php(244): eZBundleEzPublishCoreBundleImagineAliasCleaner_000000007a56d18a00007fc96a2b4e58-&gt;removeAliases(Object(eZ\Publish\Core\IO\Values\BinaryFile))
      #6 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/StorageHandler.php(111): eZ\Publish\Core\FieldType\Image\ImageStorage-&gt;deleteFieldData(Object(eZ\Publish\SPI\Persistence\Content\VersionInfo), Array, Array)
      #7 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php(519): eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler-&gt;deleteFieldData('ezimage', Object(eZ\Publish\SPI\Persistence\Content\VersionInfo), Array)
      #8 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/ezpublishDevDebugProjectContainer.php(36003): eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler-&gt;deleteFields(246, Object(eZ\Publish\SPI\Persistence\Content\VersionInfo))
      #9 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php(552): eZPublishCorePersistenceLegacyContentFieldHandler_000000007a56d45300007fc96a2b4e58-&gt;deleteFields(246, Object(eZ\Publish\SPI\Persistence\Content\VersionInfo))
      #10 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/ezpublishDevDebugProjectContainer.php(36351): eZ\Publish\Core\Persistence\Legacy\Content\Handler-&gt;deleteVersion(246, 36)
      #11 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/ContentHandler.php(212): eZPublishCorePersistenceLegacyContentHandler_000000007a56d45f00007fc96a2b4e58-&gt;deleteVersion(246, 36)
      #12 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(1628): eZ\Publish\Core\Persistence\Cache\ContentHandler-&gt;deleteVersion(246, 36)
      #13 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php(442): eZ\Publish\Core\Repository\ContentService-&gt;deleteVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #14 /home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(385): eZ\Publish\Core\SignalSlot\ContentService-&gt;deleteVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #15 [internal function]: eZ\Publish\Core\REST\Server\Controller\Content-&gt;deleteContentVersion('246', '36')
      #16 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(145): call_user_func_array(Array, Array)
      #17 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #18 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #19 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(185): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #20 /home/dp/dev/ezpublish-community/web/index.php(77): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
      #21 {main}</trace>
       <file>/home/dp/dev/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Imagine/IORepositoryResolver.php</file>
       <line>146</line>
      </ErrorMessage>xml}
      

      most likely it's a regression from EZP-22280

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: