Migrate lookup stubs don't work if the lookup migration doesn't hardcode the entity bundle: allow lookup process definition to specify defaults

Created on 1 November 2023, about 1 year ago

Problem/Motivation

The migration lookup plugin assumes that if the migration in the lookup has a content entity destination, that the destination is configured with the 'default_bundle' property.

However, if the lookup migration is mapping the bundle field value in its process pipeline, and doesn't define 'default_bundle', the attempt to create a stub entity fails, because /ContentEntityStorageBase throws an exception for a missing bundle.

MigrateStub::createStub() has a $default_values parameter, which could be used to pass in the bundle field value.

However, the migration_lookup plugin doesn't pass anything to this.

Steps to reproduce

Proposed resolution

Add a stub_default_values property to the migration_lookup plugin. Values for this are taken from the row and are passed to MigrateStub::createStub().

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024