Overrides over destination.plugin are added instead of replaced, resulting in an array of destination plugins

Created on 11 December 2018, almost 6 years ago
Updated 23 February 2024, 9 months ago

Overrides over destination.plugin are added instead of replaced, resulting in an array of destination plugins.
This is because of the way that the php function array_merge_recursive works, and it's probably happening with other plugin overrides, but I hadn't tested it.

Steps to reproduce:

1. Create a override for a migration:
default_content/overrides/node.NODE_TYPE.yml

destination:
  plugin: MY_DESTINATION_PLUGIN

2. Try to run the migration:
drush migrate:import mdc_node_NODE_TYPE

You will get the following error message and the migration won't work:

 [warning] substr() expects parameter 1 to be string, array given MigrateDestinationPluginManager.php:58
 [warning] Illegal offset type in isset or empty DiscoveryTrait.php:45

In DiscoveryTrait.php line 52:
                                      
  The "Array" plugin does not exist. 
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain akalam

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024