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

[REST] Regression - Not possible to create content filling XMLText field

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: High High
    • QA tracked issues
    • 5.2-dev
    • Platform > REST API v2
    • Server OS: CentOS 6.4
      PHP: 5.3.3
      Database: MySQL 5.1.69
      Browser: Firefox 20.0
      Interface: [REST]

    Description

      When Creating a content (object), if there is a XMLText field and it is filled, it will thrown an warning followed by an fatal error.

      Request:
      POST /api/ezp/v2/content/objects
      Authorization: Basic YWRtaW46cHVibGlzaA==
      Content-Type: application/vnd.ez.api.ContentCreate+xml
      Accept: application/vnd.ez.api.Content+json

      Request body: ( content type: folder )

      <ContentCreate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <ContentType href="/api/ezp/v2/content/types/1"/>
        <mainLanguageCode>eng-GB</mainLanguageCode>
        <LocationCreate>
          <ParentLocation href="/api/ezp/v2/content/locations/1/2" />
          <priority>0</priority>
          <hidden>false</hidden>
          <sortField>PATH</sortField>
          <sortOrder>ASC</sortOrder>
        </LocationCreate>
        <fields>
          <field>
            <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier>
            <languageCode>eng-GB</languageCode>
            <fieldValue>This is a name</fieldValue>
          </field>
          <field>
            <fieldDefinitionIdentifier>description</fieldDefinitionIdentifier>
            <languageCode>eng-GB</languageCode>
            <fieldValue>This is a description</fieldValue>
          </field>
        </fields>
      </ContentCreate>
      

      Warning:

      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP Warning:  DOMDocument::loadXML(): Start tag expected, '<' not found in Entity, line: 1 in /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php on line 206
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP Stack trace:
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   1. {main}() /var/www/html/ezpublish52/web/index.php:0
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   2. eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->handle() /var/www/html/ezpublish52/web/index.php:64
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   3. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->handle() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php:36
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   4. eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->invalidate() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:190
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   5. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->invalidate() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php:57
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   6. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:261
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   7. Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache->forward() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:244
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   8. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php:60
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   9. eZ\\Bundle\\EzPublishCoreBundle\\Kernel->handle() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:473
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  10. Symfony\\Component\\HttpKernel\\Kernel->handle() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php:62
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  11. Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2210
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  12. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2908
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  13. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2779
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  14. call_user_func_array() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2805
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  15. eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->createContent() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2805
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  16. eZ\\Publish\\Core\\REST\\Common\\Input\\Dispatcher->parse() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php:227
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  17. eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher->parse() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/Dispatcher.php:116
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  18. eZ\\Publish\\Core\\REST\\Server\\Input\\Parser\\ContentCreate->parse() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/ParsingDispatcher.php:79
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  19. eZ\\Publish\\Core\\REST\\Common\\Input\\FieldTypeParser->parseValue() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Input/Parser/ContentCreate.php:182
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  20. eZ\\Publish\\Core\\Repository\\Values\\ContentType\\FieldType->fromHash() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/FieldTypeParser.php:95
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  21. eZ\\Publish\\Core\\FieldType\\XmlText\\Type->fromHash() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Values/ContentType/FieldType.php:189
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  22. DOMDocument->loadXML() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php:206
      
      

      Fatal error:

      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP Fatal error:  Call to a member function hasChildNodes() on a non-object in /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php on line 125
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP Stack trace:
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   1. {main}() /var/www/html/ezpublish52/web/index.php:0
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   2. eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->handle() /var/www/html/ezpublish52/web/index.php:64
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   3. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->handle() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php:36
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   4. eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->invalidate() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:190
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   5. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->invalidate() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/HttpCache.php:57
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   6. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:261
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   7. Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache->forward() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:244
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   8. Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php:60
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP   9. eZ\\Bundle\\EzPublishCoreBundle\\Kernel->handle() /var/www/html/ezpublish52/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:473
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  10. Symfony\\Component\\HttpKernel\\Kernel->handle() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php:62
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  11. Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2210
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  12. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2908
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  13. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2779
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  14. call_user_func_array() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2805
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  15. eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->createContent() /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache:2805
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  16. eZ\\Publish\\Core\\SignalSlot\\ContentService->createContent() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php:234
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  17. eZ\\Publish\\Core\\Repository\\ContentService->createContent() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php:237
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  18. eZ\\Publish\\Core\\FieldType\\FieldType->acceptValue() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:559
      [Wed Aug 28 11:09:02 2013] [error] [client 192.168.2.55] PHP  19. eZ\\Publish\\Core\\FieldType\\XmlText\\Type->isEmptyValue() /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/FieldType.php:379
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no Marcos Loureiro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 15 minutes
                3h 15m