I have D7 website and I'm trying to migrate it to D8. I have these modules installed:
- migrate_drupal
- migrate_drupal_ui
- migrate_drupal_multilingual
- migrate_upgrade
- migrate_tools (8.x-4.x-dev)
- migrate_plus
On 'process' page (admin/structure/migrate/manage/migrate_drupal_7/migrations/upgrade_d7_comment_type/process) the source value of 'label' is duplicated when I check d7_comment_type plugin (path: ./core/modules/comment/migrations/d7_comment_type.yml).
Within the plugin the label property is configured with 'name' and 'constants/label_suffix' sources:
label:
plugin: concat
source:
- name
- 'constants/label_suffix'
delimiter: ' '
in Migration::__construct there is the following line:
foreach (NestedArray::mergeDeep($plugin_definition, $configuration) as $key => $value) {
NestedArray::mergeDeep() does not preserve the integer keys. As far as I can tell, the solution is to use NestedArray::mergeDeepArray().
Comment | File | Size | Author |
---|---|---|---|
#5 | 3012001-5.patch | 3.19 KB | quietone |
#5 | 3012001-5-fail.patch | 2.49 KB | quietone |
#2 | duplication-migration-process-plugin-3012001.patch | 710 bytes | rkostov |
process-d7-comment-type.png | 26.66 KB | rkostov |
Comments
Comment #2
rkostov CreditAttribution: rkostov at FFW commentedComment #3
rkostov CreditAttribution: rkostov at FFW commentedComment #4
heddnGood find. NW for tests.
Comment #5
quietone CreditAttribution: quietone as a volunteer commentedAdding a test
Comment #7
quietone CreditAttribution: quietone as a volunteer commentedThe fail patch failed as intended. This is ready for review/
Comment #8
heddnGood, we have tests for a fairly obvious bug.
Comment #9
larowlanComment #10
quietone CreditAttribution: quietone as a volunteer commentedJust noting that this fixes a problem where I was getting duplicates in the id array and the fields array of CSV source files.
Comment #11
ellenoiseChiming in to add: Patch #5 works for me, and resolves a duplicate id error in a CSV source migration.
Comment #12
catchCommitted ddfcac8 and pushed to 8.8.x. Thanks!
(and cherry-picked to 8.7.x).
Comment #15
catch