Migrations strips out all but one entity embed

Created on 4 December 2024, 19 days ago

Problem/Motivation

When there is more than one entity embed in a text area, they are removed leaving only a single migrated core media embed. This is not good at all since you cannot blindly assume that all text areas will only have a single entity embed.

Steps to reproduce

  1. Create new content with a text area with a WYSIWYG with an entity embed button & embed several different images & videos
  2. Enable the `convert_entity_media_embed` module
  3. Keep running cron until all eligible entities have been converted
  4. Check the content created in step 1 & notice that only a single migrated entity embed to core media embed remains while the others have been stripped out.

Before running the migration.

After running the migration & I just noticed that some text was stripped out so this really is a huge bug.

Proposed resolution

All entity embed markup will be migrated to core media embed code without losing anything.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mcannon Philadelphia, PA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mcannon
  • πŸ‡ΊπŸ‡ΈUnited States mcannon Philadelphia, PA
  • πŸ‡ΊπŸ‡ΈUnited States mcannon Philadelphia, PA

    I've been doing a lot of testing today & most of the time the result has been the same. My last attempt involved not changing the editor from CKEditor from 4 to 5 before running through all of the cron migrations & that seemed to work. So I think a good trouble shooting note to include in the README file would be that the migrations should run before changing the CKEditor version from 4 to 5.

  • πŸ‡ΊπŸ‡ΈUnited States inversed

    Are you certain that the embed tags were removed from the content? Using something like the diff module can help you confirm this. I have an issue that looks the same as your screenshots but where not all the <drupal-entity> tags were converted to <drupal-media>. So my CKEditor was breaking and content was being hidden on the full content display when the open and close tags did not match.

Production build 0.71.5 2024