Problem/Motivation
Migration plugins can use shared configuration with their configured migration group. In some situations, the source plugin is defined in the migration group and an error occurs if this is the case.
Steps to reproduce
Create a migration group for a migration plugin (assuming migrate tools is enabled)
Move the source configuration into the migration group under the "shared_configuration"
load the migrations and view the error.
Proposed resolution
1. Check for the `plugin` part of the migration configuration before loading the source plugin
2. Get the source plugin value from the migration group if it's available.
Interim: duplicate the plugin property into the migration configuration.
Remaining tasks
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comments
Comment #2
jurgenhaasRan into the same issue this morning after running
composer update. Suddenly my plugins are not recognized anymore. As a workaround I disabledinline_entity_form_migration_plugins_alterand operations are back to normal.Comment #3
spokjeBug seems to have snuck in in commit for Added migrate support for Drupal 7 => Drupal 8. and thus is only present in 8.x-1.0-rc9
Comment #4
quietone commentedFirst guess is this should be $settings not $settings[], https://git.drupalcode.org/project/inline_entity_form/-/blob/8.x-1.x/src...
Comment #5
damienmckennaPer quietone's suggestion.
Comment #6
damienmckennaI'm running the change locally to see if it fixes me migration problem, will report back soon.
Comment #8
damienmckennaFWIW patch #5 fixes the problems I was seeing on a site migration.
Comment #9
geek-merlinComment #10
geek-merlinComment #11
spadxiii commentedI traced a little bit further and noticed that migrate_plus_migration_plugins_alter adds more data that is being used in the alter of inline entity form. The problem is that the hook of this module is ran before the migrate_plus hook. So the data is not present yet.
The patch in #5 did not fix the problem for me.
I resolved it by adding a module_implements_alter in which I moved the migrate_plus hook first.
Comment #12
pcate commentedI ran into this migration issue as well. It was causing all imports to fail. I needed both this patch and the one in https://www.drupal.org/project/inline_entity_form/issues/3208995 to resolve the issue.
Comment #13
damienmckennaCombining the two patches.
Comment #15
damienmckennaFWIW the two patches together allow my migration to work.
Comment #16
Brian Weaver commentedI was also having migration issues, although they presented differently (errors below). The patch in #13 appears to have fixed it.
My database connection is called "source_db" and I believe some or all of my migration groups define it as shared config.
Comment #17
efpapado commented#13 worked fine for me. Should it be set to RTBC?
Comment #18
geek-merlinPatches with failing tests are NEVER RTBC. A code review shows this is only suppressing buggy functionality.
Does the related issue fix this?
Comment #19
it-cru@geek-merlin: Patch from related issue fixed this problem for me. So I would say we could mark this issue here as a duplicate of #3221074: Implemented hook_migration_plugins_alter() breaks migrations, if shared configuration used in migration configs..
Comment #20
geek-merlinThx a lot!
> So I would say we could mark this issue here as a duplicate
Done.
Comment #21
damienmckenna