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

Unable to add a new object, using Public API, if other than paragraph tag is in XML Text Block and using <literal>

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • QA tracked issues
    • 5.1, 5.2-dev
    • Field types, Platform stack
    • Server OS: Red Hat 6.4
      PHP: 5.3.3
      Database: MySQL 5.1.61
      Browser: any

    Description

      Unable to add a new object, using Public API, if other than paragraph tag is in XML Text Block and using <literal>

      If you try to add a object, using Public API, and in the XML Text Block has the following

      <?xml version='1.0' encoding='utf-8'?>
      <section>
          <literal>some text</literal>
      </section>
      

      I'll get the following error

        [eZ\Publish\Core\Base\Exceptions\InvalidArgumentException]                                                                                             
        Argument 'xmlString' is invalid: Validation of XML content failed: Element 'literal': This element is not expected. Expected is one of ( section, par  
        agraph, header ). 
      

      This will fail even with

      <?xml version='1.0' encoding='utf-8'?>
      <section>
          <header><literal>some text</literal></header>
      </section>
      

      it will only work using

      <?xml version='1.0' encoding='utf-8'?>
      <section>
          <paragraph><literal>some text</literal></paragraph>
      </section>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pedro.resende-obsolete@ez.no Pedro Resende (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: