Details
-
Bug
-
Resolution: Fixed
-
High
-
5.1-dev
-
None
-
rhel, mysql
Description
The same problem as with ezbinaryfile and ezimage occours when trying to publish a object containing a ezxmltext datatype using REST v2:
#################### - Client request BEGIN - ######################### POST /api/ezp/v2/content/objects HTTP/1.1 Host: ezpublish5.rhel61.qa.ez.local:8080 User-Agent: eZ REST QA Tester Content-Length: 1229 Authorization: Basic YWRtaW46cHVibGlzaA== Accept: application/vnd.ez.api.Content+json Content-type: application/vnd.ez.api.ContentCreate+json { "ContentCreate": { "ContentType": { "_href": "/content/types/" }, "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", "User": { "_href": "/user/users/14" }, "modificationDate": "2012-09-30T12:30:00", "fields": { "field": [ { "fieldDefinitionIdentifier": "name", "languageCode": "eng-GB", "fieldValue": "testObject1" },{ "fieldDefinitionIdentifier": "xmltext", "languageCode": "eng-GB", "fieldValue": "<?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"><paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/"><line>This is version1</line><line><strong>this is a strong text </strong></line></paragraph></section> " } ] } } } ##################### - Client request END - ########################## sending to target...done. Received from Target: ##################### - Target reply BEGIN - ########################## HTTP/1.1 500 Internal Server Error Date: Tue, 16 Apr 2013 10:07:20 GMT Server: Apache/2.2.15 (Red Hat) X-Powered-By: PHP/5.3.3 Status: 500 Internal Server Error Cache-Control: no-cache X-Debug-Token: f2b9b201870c49298a875e2dbbdd7743a151ea12 Connection: close Transfer-Encoding: chunked Content-Type: application/vnd.ez.api.ErrorMessage+json 93f {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":500,"errorMessage":"Internal Server Error","errorDescription":"Missing or invalid 'LocationCreate' element for ContentCreate.","trace":"#0 \/var\/www\/apache2php53\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Input\/ParsingDispatcher.php(79): eZ\\Publish\\Core\\REST\\Server\\Input\\Parser\\ContentCreate->parse(NULL, Object(eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher))\n#1 \/var\/www\/apache2php53\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Input\/Dispatcher.php(112): eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher->parse(NULL, 'application\/vnd...')\n#2 \/var\/www\/apache2php53\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server\/Controller\/Content.php(294): eZ\\Publish\\Core\\REST\\Common\\Input\\Dispatcher->parse(Object(eZ\\Publish\\Core\\REST\\Common\\Message))\n#3 [internal function]: eZ\\Publish\\Core\\REST\\Server\\Controller\\Content->createContent()\n#4 \/var\/www\/apache2php53\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(129): call_user_func_array(Array, Array)\n#5 \/var\/www\/apache2php53\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(73): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#6 \/var\/www\/apache2php53\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/DependencyInjection\/ContainerAwareHttpKernel.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#7 \/var\/www\/apache2php53\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php(197): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#8 \/var\/www\/apache2php53\/ezpublish5\/web\/index_dev.php(14): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#9 {main}","file":"\/var\/www\/apache2php53\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server\/Input\/Parser\/ContentCreate.php","line":99}} ###################### - Target reply END - ###########################