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

Cannot modify content after removing relation field from ContentType

    XMLWordPrintable

Details

    Description

      It is impossible to modify (publish) the article after removing Single Relation/Multiple Relation fields from the ContentType definition.

      Steps to reproduce

      1. Edit default Article ContentType
      2. Add Single Relation or Multiple Relation field. Save and publish ContentType.
      3. Create new Article. Set all required values and set relation to any allowed content.
      4. Publish article.
      5. Edit Article ContentType, remove Single Relation or Multiple Relation added previously.
      6. Save and publish ContentType.
      7. Go to Content, find your Article created in step 3. Edit article. You don't need to change anything. Click Publish.

      You should get the following error:

      500
      ErrorMessage: {_media-type: "application/vnd.ez.api.ErrorMessage+json", errorCode: 500,…}
      	errorCode: 500
      	errorDescription:"Notice: Trying to get property of non-object"
      	errorMessage:"Internal Server Error"
      	file:"/var/www/ezp11ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Helper/RelationProcessor.php"
      	line:111
      	trace:"#0 /var/www/ezp11ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Helper/RelationProcessor.php(111): Symfony\Component\Debug\ErrorHandler->handleError(8, 'Trying to get p...', '/var/www/ezp11e...', 111, Array)↵#1 /var/www/ezp11ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(1292): eZ\Publish\Core\Repository\Helper\RelationProcessor->processFieldRelations(Array, 86, 2, Object(eZ\Publish\Core\Repository\Values\ContentType\ContentType), Array)↵#2 /var/www/ezp11ee/app/cache/dev/appDevDebugProjectContainer.php(34774): eZ\Publish\Core\Repository\ContentService->updateContent(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo), Object(eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct))↵#3 /var/www/ezp11ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php(403): eZPublishCoreRepositoryContentService_000000001a6ea1bd00000000366867337fc85b18c7b4973eadef218e726fc27f->updateContent(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo), Object(eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct))↵#4 /var/www/ezp11ee/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(465): eZ\Publish\Core\SignalSlot\ContentService->updateContent(Object(eZ\Publish\Core\Repository\Values\Content\VersionInfo), Object(eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct))↵#5 /var/www/ezp11ee/vendor/ezsystems/platform-ui-bundle/Controller/Rest/ContentController.php(92): eZ\Publish\Core\REST\Server\Controller\Content->updateVersion('86', '2', Object(Symfony\Component\HttpFoundation\Request))↵#6 [internal function]: EzSystems\PlatformUIBundle\Controller\Rest\ContentController->updateVersion('86', '2', Object(Symfony\Component\HttpFoundation\Request))↵#7 /var/www/ezp11ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(142): call_user_func_array(Array, Array)↵#8 /var/www/ezp11ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)↵#9 /var/www/ezp11ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(67): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)↵#10 /var/www/ezp11ee/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(183): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)↵#11 /var/www/ezp11ee/web/app.php(70): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))↵#12 {main}"
      	_media-type:"application/vnd.ez.api.ErrorMessage+json"
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: