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

Not possible to create a new content with JSON request

    XMLWordPrintable

    Details

      Description

      [Tue May 21 19:31:19 2013] [error] [client 107.23.129.198] PHP Warning: DOMDocument::loadXML(): Start tag expected, '<' not found in Entity, line: 1 in /var/www/html/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php on line 186
      [Tue May 21 19:31:19 2013] [error] [client 107.23.129.198] PHP Fatal error: Call to a member function hasChildNodes() on a non-object in /var/www/html/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Type.php on line 123

      This is the request to REST server:

      POST /api/ezp/v2/content/objects HTTP/1.1
      Authorization:
      Basic YWRtaW46MTIzNA==
      Host:
      api.demo.ez.no
      Content-Length:
      1061
      X-Target-URI:

      Accept:
      application/vnd.ez.api.Content+json
      Content-Type:
      application/vnd.ez.api.ContentCreate+json
      Connection:
      Keep-Alive

      {
      "ContentCreate": {
      "ContentType":

      { "_href": "/content/types/1" }

      ,
      "mainLanguageCode": "eng-GB",
      "LocationCreate": {
      "ParentLocation":

      { "_href": "/content/locations/1/2" }

      ,
      "priority": "0",
      "hidden": "false",
      "sortField": "PATH",
      "sortOrder": "ASC"
      },
      "Section":

      { "_href": "/content/sections/1" }

      ,
      "alwaysAvailable": "true",
      "remoteId": "remoteId12345678",
      "fields": {
      "field": [

      { "fieldDefinitionIdentifier": "name", "languageCode": "eng-GB", "fieldValue": "New Folder" }

      ,

      { "fieldDefinitionIdentifier": "short_description", "languageCode": "eng-GB", "fieldValue": "This is a short description" }

      ]
      }
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lukasz.serwatka@ez.no Łukasz Serwatka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: