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

Publishing an object with changed xmlblock raises an error

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High
    • None
    • QA tracked issues, 2015.09.1
    • Operating System: CentOS 7.0 x64
      PHP Version: 5.4.16
      Database and version: Mariadb 5.5
      Browser (and version): Firefox 41

    Description

      I'll open this issue as an "issue" and not something else due reasons presented below.

      Publishing an object (In this case, an Image) with xmlblock filled (in this case, the "caption") raises a draft error "An error occured while publishing the draft"

      Other than the default
      <?xml version="1.0" encoding="utf-8"?>
      <section/>
      Will provoke the error

      This issue happens in every object that has a "xmlblock" attribute.

      If i enter a valid xml, then the error do not occur.

      Question tough that leade me opening the current issue as an "issue": having some mandatory fields of XmlBlock attribute, will the users have to learn xml syntax to be able to use PlatformUI? This happens when, for instance, an article is created.

      Steps to reproduce
      • Create animage object
      • fill in the Name
      • fill in the caption. I used some dummy text:
        asd
        
      • Upload an image
      • publish the image

      Then the error happens

      In firebug, I have

      POST http://ezp5.paulo/api/ezp/v2/content/objects
      	
      500 Internal Server Error
      		536ms	
      CAPI.js (line 1406)
      

      And

      {
          "ErrorMessage": {
              "_media-type": "application\/vnd.ez.api.ErrorMessage+json",
              "errorCode": 500,
              "errorMessage": "Internal Server Error",
              "errorDescription": "Warning: DOMDocument::loadXML(): Start tag expected, '&lt;' not found in
       Entity, line: 2",
              "trace": "#0 [internal function]: Symfony\\Component\\Debug\\ErrorHandler->handleError(2, 'DOMDocument
      ::lo...', '\/var\/www\/html\/e...', 44, Array)\n#1 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel
      \/eZ\/Publish\/Core\/FieldType\/XmlText\/Value.php(44): DOMDocument->loadXML('<?xml version=\"...')\n
      #2 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/FieldType\/XmlText
      \/Type.php(194): eZ\\Publish\\Core\\FieldType\\XmlText\\Value->__construct('<?xml version=\"...')\n#3
       \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Repository\/Values
      \/ContentType\/FieldType.php(191): eZ\\Publish\\Core\\FieldType\\XmlText\\Type->fromHash(Array)\n#4 
      \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Input
      \/FieldTypeParser.php(96): eZ\\Publish\\Core\\Repository\\Values\\ContentType\\FieldType->fromHash(Array
      )\n#5 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server
      \/Input\/Parser\/ContentCreate.php(169): eZ\\Publish\\Core\\REST\\Common\\Input\\FieldTypeParser->parseValue
      ('ezxmltext', Array)\n#6 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish
      \/Core\/REST\/Common\/Input\/ParsingDispatcher.php(83): eZ\\Publish\\Core\\REST\\Server\\Input\\Parser
      \\ContentCreate->parse(Array, Object(eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher))\n#7
       \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\
      /Input\/Dispatcher.php(117): eZ\\Publish\\Core\\REST\\Common\\Input\\ParsingDispatcher->parse(Array,
       'application\/vnd...')\n#8 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/platform-ui-bundle\/Rest
      \/ContentUserGateway.php(64): eZ\\Publish\\Core\\REST\\Common\\Input\\Dispatcher->parse(Object(eZ\\Publish
      \\Core\\REST\\Common\\Message))\n#9 [internal function]: EzSystems\\PlatformUIBundle\\Rest\\ContentUserGateway-
      >onKernelRequest(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request', Object
      (Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher))\n#10 \/var\/www\/html\/ezpublish5
      \/vendor\/symfony\/symfony\/src\/Symfony\/Component\/EventDispatcher\/Debug\/WrappedListener.php(61)
      : call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request'
      , Object(Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher))\n#11 [internal function]:
       Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener->__invoke(Object(Symfony\\Component\\HttpKernel
      \\Event\\GetResponseEvent), 'kernel.request', Object(Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher
      ))\n#12 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/EventDispatcher
      \/EventDispatcher.php(160): call_user_func(Object(Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener
      ), Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request', Object(Symfony
      \\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#13 \/var\/www\/html\/ezpublish5\/vendor
      \/symfony\/symfony\/src\/Symfony\/Component\/EventDispatcher\/EventDispatcher.php(48): Symfony\\Component
      \\EventDispatcher\\EventDispatcher->doDispatch(Array, 'kernel.request', Object(Symfony\\Component\\HttpKernel
      \\Event\\GetResponseEvent))\n#14 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony
      \/Component\/EventDispatcher\/Debug\/TraceableEventDispatcher.php(124): Symfony\\Component\\EventDispatcher
      \\EventDispatcher->dispatch('kernel.request', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent
      ))\n#15 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\
      /HttpKernel.php(128): Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher->dispatch
      ('kernel.request', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent))\n#16 \/var\/www\
      /html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(68)
      : Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request
      ), 1)\n#17 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel
      \/DependencyInjection\/ContainerAwareHttpKernel.php(69): Symfony\\Component\\HttpKernel\\HttpKernel-
      >handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#18 \/var\/www\/html\/ezpublish5
      \/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php(196): Symfony\\Component
      \\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation
      \\Request), 1, true)\n#19 \/var\/www\/html\/ezpublish5\/web\/index.php(66): Symfony\\Component\\HttpKernel
      \\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#20 {main}",
              "file": "\/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core
      \/FieldType\/XmlText\/Value.php",
              "line": 44
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: