Like @gbotis in https://www.drupal.org/project/inline_entity_form/issues/2953036#comment..., the changes in that issue broke my migration because they assume that $migration['process']['settings'] isn't already an array.
Example where this doesn't work:
settings:
-
plugin: d7_field_instance_settings
source:
- settings
- widget
- field_definition
-
plugin: my_example_pluginTypically in core the settings look like this, so it works for most cases:
settings:
plugin: d7_field_instance_settings
source:
- settings
- widget
- field_definitionAs inline_entity_form adds its own key (expected):
settings:
0:
plugin: d7_field_instance_settings
source:
- settings
- widget
- field_definition
inline_entity_form:
plugin: inline_entity_form_field_instance_settingsthe current implementation would double-nest the first example!
Proposed resolution:
Only convert settings to array, if it's not a nested array already. This can be detected by checking if 'plugin' key is existing at the first level.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3213595-migrationhelperalterplugins-assumes-settings-MR54-15.diff | 829 bytes | anybody |
Issue fork inline_entity_form-3213595
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nigelcunningham commentedComment #3
damyon commentedI can reproduce this error and the patch works for me.
Comment #4
djdevinRolled against latest.
Comment #5
dsnopekI also encountered this problem. The patch here fixes it for me!
Comment #6
geek-merlinComment #7
geek-merlinToo many migration issues, many of which look overlapping or duplicate.
Postponing on parent issue.
Comment #8
anybody@dsnopek & @djdevin: This seems closely related to #3221074: Implemented hook_migration_plugins_alter() breaks migrations, if shared configuration used in migration configs. how do you think should we proceed here? Could you have a look at the patch in the other issue? Should we close one as duplicate or combine both somehow?
#3294481: [PP-2] Update MigrationHelper and add hook_field_migration_field_widget_info() to add widget mappings. also contains some of the fixes from here plus other fixes!
We should make progress on the migration issues to get the parent issue fixed and things resolved!
Comment #9
anybodyComment #10
anybodyComment #11
anybodyFrom the results in #3272784: 3272784-migration-meta-issue-combined I can now clearly say, that this is an independent issue and the proposed implementation in #4 fixes THIS issue. I'm creating a MR for review, so this can be committed finally.
Comment #13
anybodyOkay here we go, setting this back to Needs review after the updates in the parent issue. Hope this is okay now @geek-merlin!
This is a clear and separate issue now, I updated the issue summary and prepared the tested fix.
Comment #14
grevil commentedWe just tested it with a custom Drupal migration, works as expected!
Comment #15
anybodyThe failing tests are unrelated and come from the module itself (see module page).
Here's the patch from MR!54 against 8.x-1.x-dev or -rc12 if anyone needs it for composer!
Comment #16
geek-merlinRe-run the patch test and it's green now.
Comment #18
geek-merlinMerged to HEAD. Thanks everyone! And especially to the friendly Drowl folks!
Comment #19
grevil commentedThank you @geek-merlin! Great addition. :)