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

Create a script to fix embedded images broken after migrating from XmlText to RichText

    XMLWordPrintable

Details

    Description

      A new migration script should be created to fix data broken after migrating from XmlText to RichText. The ticket to fix the migration script: EZP-28718. Excerpt from this ticket:

      Currently, while upgrading from eZ Publish 5.4 to eZ Platform, after running the migration script from https://github.com/ezsystems/ezplatform-xmltext-fieldtype (ezxmltext:convert-to-richtext), the embedded images are handled as plain embedded objects. Instead, they should be handled as images, which would allow the Editors to see the miniatures in Admin UI and to choose the images' aliases.
      In the database, this is what plain embedded object looks like:

      <ezembed xlink:href="ezcontent://52" view="embed"/>
      

      And this is what embedded image looks like:

      <ezembed xlink:href="ezcontent://52" view="embed" ezxhtml:class="ez-embed-type-image">
      

      Steps to reproduce

      1. Create a new eZ Publish installation.
      2. Create a new Article Content Object.
      3. Inside of one of the Article's Rich Text Fields, embed an image using "Insert/edit image" button.
      4. Migrate to eZ Platform using this guide: https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/.
      5. Migrate XmlText to RichText (https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/#321-migrate-xmltext-content-to-richtext).
      6. Open the Article in Platform UI. You will see that the image is handled as plain embed object instead of an image (for example, there won't be a miniature).

      The new command (in a migration bundle) should most probably iterate RichText content not marked as image and add image info to the RichText XML on embeds that are identified as images. The command could take an argument for specifying if that should be a specific set of content type identifiers.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: