- 🇨🇦Canada ianabc
This bit me as well. I also found
https://www.drupal.org/project/migrate_plus/issues/3322342 →
which seems to be describing the same thing. The patch above worked for me,
Hello,
I am using entity_generate to migrate a D6 text field (with multiple values) to a D8 taxonomy.
Here is an extract of my config:
source:
plugin: d6_node
node_type: evenement
track_changes: true
process:
title: title
field_types:
plugin: entity_generate
source: field_type_actu
value_key: name
bundle_key: vid
bundle: types_d_evenements
entity_type: taxonomy_term
ignore_case: true
destination:
plugin: 'entity:node'
default_bundle: evenement
no_stub: true
This works perfectly the first time I run the migration. But if I run it again with --update
, the field_types
field becomes empty.
I had a look at what EntityGenerate::transform()
returns and there is a difference.
When it creates the entity, it simply returns its ID: "1058"
But when the entity already exists, it returns the ID in an array:
array:1 [
0 => "1058"
]
(I assume the destination plugin does not like this format.)
The attached patch seems to be enough to work around my specific problem. (I have not tested it with other configurations.)
PS: I also tried the solution mentioned here → but it does not work for me (the terms are not created at all).
Active
4.1
Plugins
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This bit me as well. I also found
https://www.drupal.org/project/migrate_plus/issues/3322342 →
which seems to be describing the same thing. The patch above worked for me,