Migrate Translation in i18n node context

Created on 8 January 2020, over 4 years ago
Updated 8 July 2023, 12 months ago

There is currently no solution to easily migrate paragraph or field collection translations from Drupal 7 to Drupal 8 in an "i18n node" context.

In fact, when "i18n node" is used to translate content, on Drupal 7 the nodes are multiplied by the number of languages and each has its own paragraph / field collection tree.

There is therefore no notion of paragraph / field collection translation in this case.

However, in the context of a migration one may wish to move from multiple entities (Drupal 7) to a single entity whose translations are revisions of that entity (Drupal 8).

I therefore propose here a solution and a patch based on the principle that a paragraph / field collection is the translation of another paragraph / field collection if they have the same position in their respective content (column "delta" in the database).

From there, the principle is to indicate in the migration file the "path" to the parent node (called "the ancestor") in order to determine both the language of the paragraph (from the language of this parent node) and both the identifier of the corresponding paragraph (going down to the paragraph attached to the node corresponding to the translation).

This principle is intended to be generic and functional on several levels.
For example, I could manage the case of a node attached to a paragraph attached to a field collection.

I am attaching a schema representing this :

And I also attach the migration files representing the scenario: Node -> Paragraph -> Field Collection.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia Nixou Sydney

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

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.69.0 2024