Problem/Motivation
As a Paragraphs migration user, I expect that if I a Drupal 7 source site with both field collection and paragraphs, then the migrated types do not collide with each other.
Steps to reproduce
Try to migrate a source site with a field collection with parent field name "field_blah" and with a paragraphs type "blah".
Proposed resolution
In paragraph-related migrations (and in paragraphs provided process plugins), use migration lookups for determining the target paragraph type.
Remaining tasks
User interface changes
No UI.
API changes
Paragraph-related migrations are using migration lookups for determining the target paragraph type .
Data model changes
Nothing.
Comments
Comment #2
huzookaChanges in this issue had also address #3203739: Paragraphs migrations broken in Drupal >=9.1.4 and #3192993: [migrate_upgrade compatibility] d7_field_instance upgrade fails due to redundant 'field_' prefix removal on bundle.
Comment #3
huzookaComment #4
huzookaAddressing (additional) CS violations.
Comment #6
huzookaTest failures of envs other than PHP 7.2 & core 8.9.x are preexisting and aren't about migration tests.
Comment #7
huzookaDebug leftover.
Comment #8
huzookaAddresses #7.
Comment #9
karlsheaIs there another patch you're also using? It looks like the migrations themselves are succeeding but the field collection field itself isn't getting created (I would expect as a paragraphs field).
I'm using the migrate_upgrade module to generate configuration if that helps.
Comment #10
wim leersInitial review, trying to understand it all:
🤔 If this were a straightforward "use lookup instead of migrating blindly" case, I expected
source: bundle, but obviously it's usingsource: field_name. Why is that?😯
See and here, unlike in point 1, it does do what I expect.
Why is that?
👏 Wow … such attention to cross-version compatibility!
Wait, was this data simply wrong in the fixture?! 😨
Comment #11
karlsheaFixes for the migration prefixes added by migrate_upgrade, based on #3063273: BlockPluginId process plugin hard codes migrations breaking migrate_upgrade configuration.
Comment #13
karlsheaAhhh it's the tests manually creating the instances... I'm not going to be able to fix those for a couple of days.
Comment #14
vlad.dancerThe patch won't apply anymore since the code was changed in #3203739: Paragraphs migrations broken in Drupal >=9.1.4
Comment #15
vlad.dancerRerolling patch just without fixing the tests.
BTW: without this patch I got into this isuue #3192993: [migrate_upgrade compatibility] d7_field_instance upgrade fails due to redundant 'field_' prefix removal on bundle.
Comment #16
karlsheaTrying to fix tests
Comment #18
karlshea🤷🏻♂️
Comment #19
karlsheaUsing this patch along with latest dev, the paragraph bundle label/description is no longer created.
This config was removed from my exported migration configuration:
Comment #20
daniel korte@KarlShea It looks like #15 clobbered the label/description config
Comment #21
karlsheaReroll
Comment #23
karlsheaWhoops
Comment #25
mradcliffeI applied #3226658: Guarantee the uniqueness of the migrated paragraph types, adjusted my existing migrate_plus migration entities for field_collection_items and field_collection_type to include the new process plugin, and that did remove messages in field instance. Similar results to @vlad.dancer's comment in #3192993: [migrate_upgrade compatibility] d7_field_instance upgrade fails due to redundant 'field_' prefix removal on bundle (comment #23).
Field widget settings and field formatter settings migrations still generated messages regarding Missing bundle entity, entity type paragraphs_type.
I think that expanding the migration id to include 'd7_field_instance_widget' and 'd7_field_formatter_settings' might help with that.
Nit: trailing white spaces should be removed