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

Can't publish the draft which has parent in trash.

    XMLWordPrintable

Details

    Description

      The user can not publish content draft if the parent of this draft was moved to the trash. Moreover, the user can't do anything to publish the draft in another place, so he needs to remove it and create once again from scratch.

      Steps to reproduce (v1)

      1. Create the new folder, for e.g. Folder A
      2. Go to Folder A and create the new article, for e.g. Test article. Save the article as a draft.
      3. Go to Folder A and move it to the trash.
      4. Go to Article A draft and try to publish it.

      You should get the 404 HTTP code with message:

      <?xml version="1.0" encoding="UTF-8"?>
      <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml">
       <errorCode>404</errorCode>
       <errorMessage>Not Found</errorMessage>
       <errorDescription>Could not find 'location' with identifier '65'</errorDescription>
       <trace>#0 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php(899): eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase-&gt;getBasicNodeData('65')
      #1 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php(246): eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase-&gt;createLocationsFromNodeAssignments(65, 1)
      #2 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php(220): eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\ExceptionConversion-&gt;createLocationsFromNodeAssignments(65, 1)
      #3 /var/www/ezp12ee/app/cache/dev/appDevDebugProjectContainer.php(40818): eZ\Publish\Core\Persistence\Legacy\Content\Handler-&gt;publish(65, 1, Object(eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct))
      #4 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/ContentHandler.php(287): eZPublishCorePersistenceLegacyContentHandler_000000002547d97500000000598e9e6aaa25279924a680d2922e3d981f14bf72-&gt;publish(65, 1, Object(eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct))
      #5 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(1471): eZ\Publish\Core\Persistence\Cache\ContentHandler-&gt;publish(65, 1, Object(eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct))
      #6 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(1430): eZ\Publish\Core\Repository\ContentService-&gt;internalPublishVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #7 /var/www/ezp12ee/app/cache/dev/appDevDebugProjectContainer.php(35303): eZ\Publish\Core\Repository\ContentService-&gt;publishVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #8 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php(428): eZPublishCoreRepositoryContentService_000000002547dfd900000000598e9e6aaa25279924a680d2922e3d981f14bf72-&gt;publishVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #9 /var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(541): eZ\Publish\Core\SignalSlot\ContentService-&gt;publishVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo))
      #10 /var/www/ezp12ee/vendor/ezsystems/platform-ui-bundle/Controller/Rest/ContentController.php(114): eZ\Publish\Core\REST\Server\Controller\Content-&gt;publishVersion('65', '1')
      #11 [internal function]: EzSystems\PlatformUIBundle\Controller\Rest\ContentController-&gt;publishVersion('65', '1')
      #12 /var/www/ezp12ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(142): call_user_func_array(Array, Array)
      #13 /var/www/ezp12ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #14 /var/www/ezp12ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(67): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #15 /var/www/ezp12ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(183): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #16 /var/www/ezp12ee/web/app.php(67): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
      #17 {main}</trace>
       <file>/var/www/ezp12ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php</file>
       <line>84</line>
      </ErrorMessage>
      

      Steps to reproduce (v2):
      1) Create a parent folder and publish it
      2) Create a draft of a new folder under the one created in the previous step
      3) Remove folder created in step 1
      4) Go to dashboard, try to edit a draft created in step 2

      Result:
      You'll get an exception like the following

      Type error: Return value of EzSystems\EzPlatformAdminUi\RepositoryForms\View\ViewParametersListener::resolveParentLocation() must be an instance of eZ\Publish\API\Repository\Values\Content\Location, boolean returned
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kamil.madejski@ibexa.co Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: