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

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Invalid
    • Affects Version/s: 5.2-dev
    • Fix Version/s: QA tracked issues
    • Component/s: Platform > REST API v2
    • Labels:
    • Environment:

      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
      

        Activity

        Hide
        Petar Spanja (Inactive) added a comment -

        @Marcos Loureiro

        I'm interested how is this a regression, as far as I can see providing plain text string for XmlText never worked, either over REST or from PAPI.
        Intended usage over REST is like this:

         
        <fieldValue>
          <value key="xml">(EZXML XML STRING HERE)</value>
        </fieldValue>

        If this is not a regression, then the possible issue should be about adding support for plain text string as value, which would be created as paragraph.

        Show
        Petar Spanja (Inactive) added a comment - @ Marcos Loureiro I'm interested how is this a regression, as far as I can see providing plain text string for XmlText never worked, either over REST or from PAPI. Intended usage over REST is like this: < fieldValue > < value key = "xml" >(EZXML XML STRING HERE)</ value > </ fieldValue > If this is not a regression, then the possible issue should be about adding support for plain text string as value, which would be created as paragraph.
        Hide
        Marcos Loureiro (Inactive) added a comment -

        This is somewhat related to EZP-21431
        And if there's nothing wrong with it, it was a wrong interpretation by my side.
        So it should be closed as invalid.

        Show
        Marcos Loureiro (Inactive) added a comment - This is somewhat related to EZP-21431 And if there's nothing wrong with it, it was a wrong interpretation by my side. So it should be closed as invalid.
        Hide
        Marcos Loureiro (Inactive) added a comment - - edited

        that didn't work, got the same error again.

        Looking into examples found that there was a "value" tag missing:

             <fieldValue>
                    <value>
                      <value key="xml">John Doe</value>
                    </value>
             </fieldValue>
        

        however this as thrown an different error:

        "errorDescription": "'xml' index is missing in hash."
        

        here:

               "file": "/var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php",
               "line": 202
        

        Trace:

         "trace": "
        #0 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Values/ContentType/FieldType.php(189): eZ\\Publish\\Core\\FieldType\\XmlText\\Type->fromHash(Array)\n
        #1 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/FieldTypeParser.php(95): eZ\\Publish\\Core\\Repository\\Values\\ContentType\\FieldType->fromHash(Array)\n
        #2 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Input/Parser/ContentCreate.php(182): eZ\\Publish\\Core\\REST\\Common\\Input\\FieldTypeParser->parseValue('ezxmltext', Array)\n
        #3 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/ParsingDispatcher.php(79): eZ\\Publish\\Core\\REST\\Server\\Input\\Parser\\ContentCreate->parse(Array, Object(eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher))\n
        #4 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/Dispatcher.php(116): eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher->parse(Array, 'application/vnd...')\n
        #5 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(225): eZ\\Publish\\Core\\REST\\Common\\Input\\Dispatcher->parse(Object(eZ\\Publish\\Core\\REST\\Common\\Message))\n
        #6 [internal function]: eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->createContent()\n
        #7 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2815): call_user_func_array(Array, Array)\n
        #8 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2789): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n
        #9 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2918): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
        #10 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2220): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
        #11 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php(62): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n
        #12 /var/www/html/ezpublish52/web/index.php(64): eZ\\Bundle\\EzPublishCoreBundle\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n
        #13 {main}",
        

        Q: What am I missing?

        Show
        Marcos Loureiro (Inactive) added a comment - - edited that didn't work, got the same error again. Looking into examples found that there was a "value" tag missing: < fieldValue > < value > < value key = "xml" >John Doe</ value > </ value > </ fieldValue > however this as thrown an different error: "errorDescription": "'xml' index is missing in hash." here: "file": "/var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php", "line": 202 Trace: "trace": " #0 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/Values/ContentType/FieldType.php(189): eZ\\Publish\\Core\\FieldType\\XmlText\\Type->fromHash(Array)\n #1 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/FieldTypeParser.php(95): eZ\\Publish\\Core\\Repository\\Values\\ContentType\\FieldType->fromHash(Array)\n #2 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Input/Parser/ContentCreate.php(182): eZ\\Publish\\Core\\REST\\Common\\Input\\FieldTypeParser->parseValue('ezxmltext', Array)\n #3 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/ParsingDispatcher.php(79): eZ\\Publish\\Core\\REST\\Server\\Input\\Parser\\ContentCreate->parse(Array, Object(eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher))\n #4 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Common/Input/Dispatcher.php(116): eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher->parse(Array, 'application/vnd...')\n #5 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php(225): eZ\\Publish\\Core\\REST\\Common\\Input\\Dispatcher->parse(Object(eZ\\Publish\\Core\\REST\\Common\\Message))\n #6 [internal function]: eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->createContent()\n #7 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2815): call_user_func_array(Array, Array)\n #8 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2789): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n #9 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2918): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n #10 /var/www/html/ezpublish52/ezpublish/bootstrap.php.cache(2220): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n #11 /var/www/html/ezpublish52/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php(62): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n #12 /var/www/html/ezpublish52/web/index.php(64): eZ\\Bundle\\EzPublishCoreBundle\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n #13 {main}", Q: What am I missing?
        Hide
        Petar Spanja (Inactive) added a comment - - edited

        @Marcos Loureiro

        Example provided is correct, but it needs to contain proper eZXML string, like:

        <?xml version="1.0" encoding="UTF-8"?>
        <section xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
                 xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
                 xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
          <header>This is a heading.</header>
          <paragraph>This is a paragraph.</paragraph>
          <section>
            <header>This is a second heading.</header>
            <paragraph>This is a second paragraph.</paragraph>
          </section>
        </section>
        

        It also needs to be escaped.

        Show
        Petar Spanja (Inactive) added a comment - - edited @ Marcos Loureiro Example provided is correct, but it needs to contain proper eZXML string, like: <?xml version="1.0" encoding="UTF-8"?> <section xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <header>This is a heading.</header> <paragraph>This is a paragraph.</paragraph> <section> <header>This is a second heading.</header> <paragraph>This is a second paragraph.</paragraph> </section> </section> It also needs to be escaped.
        Hide
        Marcos Loureiro (Inactive) added a comment -

        true, it does work
        closing it as invalid

        <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>
                <value key="xml">
        &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
        &lt;section xmlns:xhtml=&quot;http://ez.no/namespaces/ezpublish3/xhtml/&quot;
                 xmlns:image=&quot;http://ez.no/namespaces/ezpublish3/image/&quot;
                 xmlns:custom=&quot;http://ez.no/namespaces/ezpublish3/custom/&quot;&gt;
          &lt;header&gt;This is a heading.&lt;/header&gt;
          &lt;paragraph&gt;This is a paragraph.&lt;/paragraph&gt;
          &lt;section&gt;
            &lt;header&gt;This is a second heading.&lt;/header&gt;
            &lt;paragraph&gt;This is a second paragraph.&lt;/paragraph&gt;
          &lt;/section&gt;
        &lt;/section&gt;
                </value>
              </fieldValue>
            </field>
          </fields>
        </ContentCreate>

        Show
        Marcos Loureiro (Inactive) added a comment - true, it does work closing it as invalid < 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 > < value key = "xml" > &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;section xmlns:xhtml=&quot;http://ez.no/namespaces/ezpublish3/xhtml/&quot; xmlns:image=&quot;http://ez.no/namespaces/ezpublish3/image/&quot; xmlns:custom=&quot;http://ez.no/namespaces/ezpublish3/custom/&quot;&gt; &lt;header&gt;This is a heading.&lt;/header&gt; &lt;paragraph&gt;This is a paragraph.&lt;/paragraph&gt; &lt;section&gt; &lt;header&gt;This is a second heading.&lt;/header&gt; &lt;paragraph&gt;This is a second paragraph.&lt;/paragraph&gt; &lt;/section&gt; &lt;/section&gt; </ value > </ fieldValue > </ field > </ fields > </ ContentCreate >

          People

          • Assignee:
            Unassigned
            Reporter:
            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