Change record status: 
Project: 
Introduced in branch: 
8.x-1.x
Introduced in version: 
8.x-1.0-alpha2
Description: 

Media Migration transforms media_filter filter plugin tokens (Drupal 7 Media WYSIWYG module) to entity_embed (<drupal-entity>) HTML tags. After the token transform, the new embed entity (<drupal-entity>) HTML tag has been referencing the media entity by its ID.

Referrencing entities based on their ID is deprecated in Entity Embed, and it is impossible with Drupal core's Media module.

In order to make it possible to support media_filtermedia_embed (Drupal 8/9 Media) token transform, Media Migration is now able to support UUID-based referencing. To use the new method, developers should define a Media Migration-specific setting in the destination site's settings.php:

$settings['media_migration_embed_media_reference_method'] = 'uuid';

The possible values of this setting are id and uuid. If this key is not defined or its value is not id or uuid, then the entity reference method remains ID-based.

Transformed embed code without specifying UUID-based reference:

<drupal-entity
  data-embed-button="media"
  data-entity-embed-display="view_mode:media.full"
  data-entity-type="media"
  data-entity-id="312"></drupal-entity>

With UUID-based reference:

<drupal-entity
  data-embed-button="media"
  data-entity-embed-display="view_mode:media.full"
  data-entity-type="media"
  data-entity-uuid="71e3a665-9472-4cfc-9252-258d289f0e98"></drupal-entity>
Impacts: 
Site builders, administrators, editors
Module developers