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:
And this is what embedded image looks like:
Steps to reproduce
- Create a new eZ Publish installation.
- Create a new Article Content Object.
- Inside of one of the Article's Rich Text Fields, embed an image using "Insert/edit image" button.
- Migrate to eZ Platform using this guide: https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/.
- Migrate XmlText to RichText (https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/#321-migrate-xmltext-content-to-richtext).
- 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.