- Issue created by @baikho
When using ParagraphsSubProcess for multiple sources, the transform()
method accumulates results using the +
operator. This causes data loss when multiple paragraph items have the same numeric keys since +
preserves the left-hand array's keys and ignores duplicates from the right-hand side.
As a result, only a subset of the paragraphs are migrated when merging results from multiple sources.
Example:
field_paragraphs:
plugin: paragraphs_sub_process
source: field_paragraphs
migration:
- paragraph_media_text
- paragraph_text
- paragraph_teaser
process:
target_id: '0'
target_revision_id: '1'
Replace the +
operator with array_merge()
to ensure all items are appended properly regardless of numeric keys:
Review & test
N/A
N/A
N/A
Active
1.0
Code