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

'Argument '$xmlString' is invalid:' error occurs after trying to publish content with invalid chars

    XMLWordPrintable

Details

    Description

      Error occurs after copypasting invalid chars (from https://jira.ez.no/browse/EZP-31248)

       

      Steps to reproduce
      1. Go to Content/ Content structure

      2. Click on Create -> Article

      3. Paste content of .txt file to rich text field

      4. Click 'Publish' button

       

       

      Current

      Error occurs: 

      Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
      Argument '$xmlString' is invalid: PCDATA invalid Char value 19
      PCDATA invalid Char value 20
      PCDATA invalid Char value 21
      PCDATA invalid Char value 14
      PCDATA invalid Char value 15
      PCDATA invalid Char value 16
      PCDATA invalid Char value 18
      PCDATA invalid Char value 16
      PCDATA invalid Char value 17
      PCDATA invalid Char value 14
      PCDATA invalid Char value 16
      PCDATA invalid Char value 18
      PCDATA invalid Char value 16
      PCDATA invalid Char value 17

      at vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ExceptionListener.php:52
      at eZ\Bundle\EzPublishCoreBundle\EventListener\ExceptionListener->onKernelException(object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
      (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:115)
      at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
      (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:214)
      at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(GetResponseForExceptionEvent))
      (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44)
      at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent))
      (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:143)
      at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent))
      (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:227)
      at Symfony\Component\HttpKernel\HttpKernel->handleException(object(InvalidXmlException), object(Request), 1)
      (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:79)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
      (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
      (web/app.php:64)

      Expected
      Content is published properly or some kind of validation kicks in.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tomasz.szopinski@ibexa.co Tomasz Szopiński
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: