migrating into a subfield clobbers a previous whole field migration

Created on 17 September 2024, 6 months ago

Problem/Motivation

If you do something like this:

  body_field: source_field
  body_field/format:
    plugin: default_value
    default_value: rich_text

Then the body field's value is clobbered by the subfield process item.

It would be nice if there was a warning that this configuration isn't productive.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated 32 minutes ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

  • Issue created by @joachim
  • πŸ‡ΊπŸ‡ΈUnited States TolstoyDotCom L.A.

    MigrateExecutable::import calls checkRequirements() on the migration and stops the import if it throws an exception. One option would be to add something else in that method but just have it post a warning.

    However, maybe a separate service that takes a yml file and runs it through a series of tests might be better. That would help debug issues with the file. Each test could be a plugin: a ClobberedSubfield plugin, one that checks if the source file exists, is readable, and has real data, etc.

  • πŸ‡¬πŸ‡§United Kingdom joachim

    We don't need new machinery for this.

    MigrationPluginManager::processDefinition() is the place to check that the definition of a migration is well-formed.

Production build 0.71.5 2024