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

Can't publish/save content with missing ezlocation URL

    XMLWordPrintable

Details

    Description

      Steps to reproduce for eZ Platform
      1. Create new Article (or another ContentType object which has RichText filed) for e.g. Article A,
      2. Create the second content object, for e.g. Article B. Let's assume, that this article has LocationId 63.
      3. Edit Article A, in RichText editor, add some paragraph with text, select few words and click on add URL button. Then, click on Select content, select Article B, then Save URL and publish content.
      4. Move Article B to trash.
      5. Try to edit Article A. It will be impossible to save until you manually remove previously the added link. If you edit the link, you will see ezlocation://63 in Link to: field.

      The editor gets the exception message:

      The content cannot be published (Connection error : 404.)
      

      Full error message:

      {
          "ErrorMessage": {
              "_media-type": "application\/vnd.ez.api.ErrorMessage+json",
              "errorCode": 404,
              "errorMessage": "Not Found",
              "errorDescription": "Could not find 'location' with identifier '63'",
              "trace": "#0 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/Location\/Gateway\/ExceptionConversion.php(57): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase->getBasicNodeData('63')\n#1 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/TreeHandler.php(158): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion->getBasicNodeData('63')\n#2 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/Location\/Handler.php(109): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\TreeHandler->loadLocation('63')\n#3 \/var\/www\/ezp11ee\/app\/cache\/dev\/appDevDebugProjectContainer.php(40988): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Handler->load('63')\n#4 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Cache\/LocationHandler.php(30): eZPublishCorePersistenceLegacyContentLocationHandler_000000002c109b340000000041726bad7fc85b18c7b4973eadef218e726fc27f->load('63')\n#5 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Repository\/Helper\/RelationProcessor.php(74): eZ\\Publish\\Core\\Persistence\\Cache\\LocationHandler->load('63')\n#6 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Repository\/ContentService.php(1237): eZ\\Publish\\Core\\Repository\\Helper\\RelationProcessor->appendFieldRelations(Array, Array, Object(eZ\\Publish\\Core\\FieldType\\RichText\\Type), Object(eZ\\Publish\\Core\\FieldType\\RichText\\Value), 121)\n#7 \/var\/www\/ezp11ee\/app\/cache\/dev\/appDevDebugProjectContainer.php(34528): eZ\\Publish\\Core\\Repository\\ContentService->updateContent(Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\VersionInfo), Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\ContentUpdateStruct))\n#8 \/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/SignalSlot\/ContentService.php(403): eZPublishCoreRepositoryContentService_000000002c10869f0000000041726bad7fc85b18c7b4973eadef218e726fc27f->updateContent(Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\VersionInfo), Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\ContentUpdateStruct))\n#9 \/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))\n#10 \/var\/www\/ezp11ee\/vendor\/ezsystems\/platform-ui-bundle\/Controller\/Rest\/ContentController.php(92): eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->updateVersion('63', '5', Object(Symfony\\Component\\HttpFoundation\\Request))\n#11 [internal function]: EzSystems\\PlatformUIBundle\\Controller\\Rest\\ContentController->updateVersion('63', '5', Object(Symfony\\Component\\HttpFoundation\\Request))\n#12 \/var\/www\/ezp11ee\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(144): call_user_func_array(Array, Array)\n#13 \/var\/www\/ezp11ee\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(64): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#14 \/var\/www\/ezp11ee\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/DependencyInjection\/ContainerAwareHttpKernel.php(69): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 \/var\/www\/ezp11ee\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php(185): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 \/var\/www\/ezp11ee\/web\/app.php(70): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#17 {main}",
              "file": "\/var\/www\/ezp11ee\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/Location\/Gateway\/DoctrineDatabase.php",
              "line": 84
          }
      }
      

      Steps to reproduce for eZ Publish
      1. Create new Article (or another Content Object which has RichText filed) for e.g. Article A,
      2. Create the second content object, for e.g. Article B. Let's assume, that this article has Node ID 63.
      3. Edit Article A, in RichText editor, add some paragraph with text, select few words and click on "Insert/edit link" button. Then, click on Browse, select Article B, then Save URL and publish content.
      4. Move Article B to trash.
      5. Try to edit Article A. It will be impossible to save until you manually remove previously the added link. If you edit the link, you will see eznode://63 in Href field.

      The editor gets the exception message:

      The draft was only partially stored.
      Body:
      Node 63 does not exist.
      

      The issue also happens when trying to update the content via Public API in both eZ Publish and eZ Platform.

      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:
              Resolved: