Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-3495

Converting the XMLText field to RichText can result in missing embeds

    XMLWordPrintable

Details

    Description

      Some XML code containing Embeds can end up missing those embeds after converting to the RichText.

      Steps to reproduce
      1. Clean installation of eZ Platform 2.5 or Ibexa DXP 3.2/3.3
      2, Install and enable https://github.com/ezsystems/ezplatform-xmltext-fieldtype
      3. Login into the back office as the admin and create an Image content (it will have id 55 on v2.5 - if your Image has different Id remember to change the value of object_id attribute below).
      4. Create a new Content Type XML Test containing XML block field called body.
      5. Create and Publish a new XML Test Content, with body set to:

      <?xml version="1.0" encoding="UTF-8"?>
      <section xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/" xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/">
        <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
      	 <table class="default" border="0" width="100%" custom:align="center" custom:summary="Lorem ipsum" custom:caption="Lorem ipsum">
      		<tr>
      		   <td xhtml:width="100%" custom:valign="top">
      			  <paragraph>Lorem ipsum dolor sit amet, consectetur adipiscing elit</paragraph>
      		   </td>
      		</tr>
      	 </table>
      	 <line>
      		<embed view="embed" size="medium" object_id="55" custom:offset="0" custom:limit="48" />
      	 </line>
        </paragraph>
      </section>
      

      6. Execute the Command converting XML block to RichText field.

      php bin/console ezxmltext:convert-to-richtext
      

      and clear the cache.
      7. Open again the Content created in step 4.

      Result
      Embed will be missing from the body.

      Expected result
      Embeds will be displayed in the same way as before the conversion.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: