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

Exception when loading content with image with '/images-versioned/' path

    XMLWordPrintable

    Details

    • Sprint:
      Castor Core S1

      Description

      It affects the PreviewController, leading to an exception when previewing content with an image.

      To reproduce on an install with DemoBundle:

      1. Create a article in the backoffice
      2. Set the title and abstract, and select an image
      3. Hit preview in the left column

      eZ\Publish\Core\Base\Exceptions\InvalidArgumentException: Argument '$id' is invalid: Prefix images not found in images-versioned/1185/1-eng-GB/EZP-223401.jpg
          at n/a
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/IO/IOService.php line 357
      
          at eZ\Publish\Core\IO\IOService->removeUriPrefix('images-versioned/1185/1-eng-GB/EZP-223401.jpg')
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/IO/IOService.php line 248
      
          at eZ\Publish\Core\IO\IOService->getExternalPath('var/ezdemo_site/storage/images-versioned/1185/1-eng-GB/EZP-223401.jpg')
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/FieldType/Image/ImageStorage.php line 214
      
          at eZ\Publish\Core\FieldType\Image\ImageStorage->getFieldData(object(VersionInfo), object(Field), array('identifier' => 'LegacyStorage', 'connection' => object(eZPublishCorePersistenceDoctrineConnectionHandler_0000000064396b14000000005650cdd6)))
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/StorageHandler.php line 95
      
          at eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler->getFieldData(object(VersionInfo), object(Field))
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php line 340
      
          at eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler->loadExternalFieldData(object(Content))
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php line 330
      
          at eZ\Publish\Core\Persistence\Legacy\Content\Handler->load('214', '1', array('eng-GB'))
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/ContentHandler.php line 64
      
          at eZ\Publish\Core\Persistence\Cache\ContentHandler->load('214', '1', array('eng-GB'))
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php line 379
      
          at eZ\Publish\Core\Repository\ContentService->internalLoadContent('214', array('eng-GB'), '1')
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php line 325
      
          at eZ\Publish\Core\Repository\ContentService->loadContent('214', array('eng-GB'), '1')
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php line 191
      
          at eZ\Publish\Core\SignalSlot\ContentService->loadContent('214', array('eng-GB'), '1')
              in /home/bertrand/ezpublish5/app/cache/dev/appDevDebugProjectContainer.php line 21554
      
          at eZPublishCoreRepositoryContentService_0000000064396bc7000000005650cdd6->loadContent('214', array('eng-GB'), '1')
              in /home/bertrand/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Controller/Content/PreviewController.php line 74
      
          at eZ\Publish\Core\MVC\Symfony\Controller\Content\PreviewController->previewContentAction('214', '1', 'eng-GB', 'ezdemo_site_user')
              in  line 
      
          at call_user_func_array(array(object(PreviewController), 'previewContentAction'), array('214', '1', 'eng-GB', 'ezdemo_site_user'))
              in /home/bertrand/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 117
      
          at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
              in /home/bertrand/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 61
      
          at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
              in /home/bertrand/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 62
      
          at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
              in /home/bertrand/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 187
      
          at Symfony\Component\HttpKernel\Kernel->handle(object(Request), '1', true)
              in /home/bertrand/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php line 67
      
          at eZ\Bundle\EzPublishCoreBundle\Kernel->handle(object(Request))
              in /home/bertrand/ezpublish5/app/web/index.php line 79
      

      Most likely caused by the 'images-versioned' path item instead of 'images'. The new stack doesn't know at all about this prefix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bertrand.dunogier@ez.no Bertrand Dunogier
              • Votes:
                0 Vote for this issue
                Watchers:
                6 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 day, 30 minutes
                  1d 30m