- Issue created by @nicxvan
- πΊπΈUnited States apmsooner
Is that 3 levels of paragraphs it sounds like? You're on the right track with starting from deepest and working you're way up. If the paragraphs and their fields are indeed translated, it should just technically work from the testing that I've done. Maybe you could bullet point the hierarchy and field structure so I could understand better? And if you wanted to attach the updater configs that might be helpful.
- πΊπΈUnited States apmsooner
FYI, I'm gonna try to add drush commands this wknd similar to custom_field for this module so it will be easier to test this out locally without having to run update hooks.
- πΊπΈUnited States nicxvan
Sure!
Here is the structure:
- Level 1: Three column component
- Level 2: Image Text Paragraph
- Level 3a: Image Paragraph -> Media reference
- Level 3b: Text Paragraph -> Text field (yes I know this is redundant)
So I created two new fields on level 2 one for a media reference, one for a text field. Both translateable.
I wrote migration 1 from level 3a to the media reference on level 2.
I wrote migration 2 from level 3b to the text field on level 2.I created new custom field with media and text translateable.
I wrote migration 3 from level 2 media field to custom field media and level 2 text field to custom field text.This migrated only the english.
- πΊπΈUnited States apmsooner
Are 3a & 3b referenced from the same field on level 2? Its a single field that references both types right? If so, You should be able to just create the custom field on level 2 which in this case the target type is gonna be the paragraph and bundle on level 2 and then the source field would be the paragraphs field and you would check both bundles. The mapping would be relevant to the fields on those paragraphs. The only thing im not sure of around translations is the way paragraphs module handles these in child levels. It gets a little weird with paragraphs and multilingual from my experience.
- πΊπΈUnited States nicxvan
Level 2 has separate fields for each one.
I think for this case it's better to write something custom.
I'll likely use this module for most other moves since they are almost all just a single level transition.
This module is super impressive!