Details

      Description

      Steps to reproduce:

      • In the legacy backoffice ( or on in the new one, if it came out by the time you read this bug repport )
      • Edit the blog_post content class
      • Add an author attribute
      • Create a new blog_post do not fill the Author
      • Then either:
        • Display it in the treemenu in platform UI (and you will see an error 500 with a stacktrace in the XHR requests)
        • Load the content using the REST API

      The stack:

      #0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleError(2, 'DOMDocument::lo...', '/home/yan/prog/...', 133, Array)
      #1 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/Author.php(133): DOMDocument->loadXML('')
      #2 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/Author.php(52): eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Author->restoreValueFromXmlString(NULL)
      #3 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php(419): eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Author->toFieldValue(Object(eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue), Object(eZ\Publish\SPI\Persistence\Content\FieldValue))
      #4 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php(382): eZ\Publish\Core\Persistence\Legacy\Content\Mapper->extractFieldValueFromRow(Array, 'ezauthor')
      #5 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php(212): eZ\Publish\Core\Persistence\Legacy\Content\Mapper->extractFieldFromRow(Array)
      #6 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php(327): eZ\Publish\Core\Persistence\Legacy\Content\Mapper->extractContentFromRows(Array)
      #7 /home/yan/prog/ezpublish-community/ezpublish/cache/dev/ezpublishDevDebugProjectContainer.php(40529): eZ\Publish\Core\Persistence\Legacy\Content\Handler->load('91', 1, NULL)#8 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/ContentHandler.php(70): eZPublishCorePersistenceLegacyContentHandler_000000005221a224000000001abe55b1->load('91', 1, NULL)
      #9 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(418): eZ\Publish\Core\Persistence\Cache\ContentHandler->load('91', 1, NULL)
      #10 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php(351): eZ\Publish\Core\Repository\ContentService->internalLoadContent('91', NULL, NULL, false, true)#11 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php(194): eZ\Publish\Core\Repository\ContentService->loadContent('91', NULL, NULL, true)
      #12 /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(89): eZ\Publish\Core\SignalSlot\ContentService->loadContent('91', NULL)
      #13 [internal function]: eZ\Publish\Core\REST\Server\Controller\Content->loadContent('91')
      #14 /home/yan/prog/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(145): call_user_func_array(Array, Array)
      #15 /home/yan/prog/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #16 /home/yan/prog/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #17 /home/yan/prog/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(186): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #18 /home/yan/prog/ezpublish-community/web/index.php(81): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
      #19 {main}
      

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment - - edited

          I could not reproduce this on master / 5.4 (well, I created the content on a 5.4 that was connected to my 1.x database).

          I have created the content from the legacy backoffice. It was pre-filled with the admin user when I created the initial version, and I have removed what was automatically added. The author field's XML contains

          <?xml version="1.0" encoding="utf-8"?>
          <ezauthor><authors/></ezauthor>
          

          It seems that the error occurs when the XML is empty, but I don't see how it can be empty.

          Show
          Bertrand Dunogier added a comment - - edited I could not reproduce this on master / 5.4 (well, I created the content on a 5.4 that was connected to my 1.x database). I have created the content from the legacy backoffice. It was pre-filled with the admin user when I created the initial version, and I have removed what was automatically added. The author field's XML contains <?xml version="1.0" encoding="utf-8"?> <ezauthor><authors/></ezauthor> It seems that the error occurs when the XML is empty, but I don't see how it can be empty.
          Hide
          Bertrand Dunogier added a comment -

          Ping [~yannick.roger@ez.no]

          Show
          Bertrand Dunogier added a comment - Ping [~yannick.roger@ez.no]

            People

            • Assignee:
              Unassigned
              Reporter:
              Yannick Roger (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: