Details
-
Bug
-
Resolution: Unresolved
-
High
-
1.7.5, 1.12.0, 3.3.1, 2.5.17, 3.2.5
-
None
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)
- Create the new folder, for e.g. Folder A
- Go to Folder A and create the new article, for e.g. Test article. Save the article as a draft.
- Go to Folder A and move it to the trash.
- 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->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->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->createLocationsFromNodeAssignments(65, 1) #3 /var/www/ezp12ee/app/cache/dev/appDevDebugProjectContainer.php(40818): eZ\Publish\Core\Persistence\Legacy\Content\Handler->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->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->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->internalPublishVersion(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo)) #7 /var/www/ezp12ee/app/cache/dev/appDevDebugProjectContainer.php(35303): eZ\Publish\Core\Repository\ContentService->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->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->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->publishVersion('65', '1') #11 [internal function]: EzSystems\PlatformUIBundle\Controller\Rest\ContentController->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->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->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->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/ezp12ee/web/app.php(67): Symfony\Component\HttpKernel\Kernel->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