References to missing D7 source files should not have UUIDs prophecised

Created on 23 March 2023, almost 2 years ago
Updated 24 March 2023, almost 2 years ago

Problem/Motivation

If a D7 source DB contains a content reference to a file (eg [[{"fid": "549","view_mode": "wysiwyg","fields": {"format": "wysiwyg","field_whatever[und][0][value]": "whatever"},"link_text": null,"type": "media"}]]) where the file has been deleted from the source DB, Media Migration may "prophecise" a UUID for a Media entity which will never exist, and output a <drupal-media> embed which points to a UUID which will never be created.

This can be complicated to debug as the Media ID and UUID are unlikely to match the D7 File ID.

A better behaviour might be to signal to the migration developer or content reviewer that the content reference points to an invalid file.

Steps to reproduce

  1. Source content with [[{"fid": "549","type":"media"}]] or similar
  2. File 549 does not exist in the source DB
  3. Media Migration configured to output media embeds using UUIDs (?)

When executed, the migrated content will contain <drupal-media> with a UUID which does not relate to any Media in the destination system.

Proposed resolution

Provide configuration to Media Migrate processing which makes it optional to either:

  • prophecise a UUID, and assign it to media entities later
  • fail migration row if invalid source references are detected
  • warn on migrations (by recording a migration message) which contain invalid source references

I confess I haven't fully wrapped my head around the purpose of the oracle prophecising UUIDs here, so my proposed solution is a bit speculative!

Remaining tasks

API changes

Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

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

Comments & Activities

Production build 0.71.5 2024