- last update
8 months ago 1 pass - last update
8 months ago 1 pass - πΊπΈUnited States majorrobot
Thanks for all your work on this @spiderman and @DieterHolvoet. I was able to get this to work with nodes with translations.
For those attempting this kind of migration, there were two things that were not obvious to me, but completely necessary. (It may be like this in non-drupal8 translation migrations, too -- I just don't know/)
- Create a migration for the first language and then a migration (which will be very similar) for any other language you want to import. Make sure you have
translations: true
in thesource
anddestination
portions of the non-original-language migrations. - When migrating the non-original language(s), you'll need to use a
migration_lookup
in theprocess
section to set thenid
of the translated nodes. (The original and all translations of a node share the same nid.)
An example, migrating a "resource" content type with translation to a second language:
id: my_migration_en label: my_migration_en migration_tags: - Drupal 8 - resources source: plugin: d8_entity key: migrate entity_type: node bundle: resource process: title: title body: body status: status langcode: langcode bundle: 'resource' destination: plugin: entity:node default_bundle: resource
id: my_migration_es label: my_migration_es migration_tags: - Drupal 8 - resources source: plugin: d8_entity key: migrate entity_type: node bundle: resource translations: true process: title: title body: body status: status bundle: 'resource' langcode: langcode nid: plugin: migration_lookup migration: my_migration_en source: nid destination: plugin: entity:node default_bundle: resource translations: true nid: nid
I've set this issue to Needs Review to see if the fix will move along.
- Create a migration for the first language and then a migration (which will be very similar) for any other language you want to import. Make sure you have
- First commit to issue fork.
- Status changed to Needs work
4 months ago 8:20pm 18 July 2024 - πΊπΈUnited States majorrobot
I took a peek at the failing tests -- looks like there's one main PHPUnit failure. I rebased on most recent 8.x-1.x-dev and cleaned up a few of phpcs's complaints. I don't have a deep familiarity with the module, so am still digging into the unit test issue.
- Status changed to Needs review
4 months ago 2:43pm 2 August 2024 - π¨π¦Canada wilco
I have been trying to use this patch for the latest build 1.2.0 to no avail. This is my response to that...
- π·π΄Romania bbu23
Adding a new patch created from previous version's applied patch, rebased with the new version.
Reason: the MR does not apply as confirmed by @wilco, but although the patch in #22 does apply, the migration throws an error when I try to import it.