0

I'm trying to figure out how migrating content from a Drupal 7 site to a Drupal 8 site works. I managed to understand how to create a custom module to migrate nodes with regular fields to my new D8 site.

But I also have one content type where I use paragraphs. And I can't seem to find a well documented example on how to do this. I found some examples but they all seem to use different methods. This one seems like the most up to date. But how to make the code from #9 work?

field_paragraphs:
plugin: sub_process
source: field_source_paragraphs
process:
  target_id:
    -
      plugin: migration_lookup
      migration:
        - paragraph_box
        - paragraph_grid
        - paragraph_text_embedded
      source: value
    -
      plugin: extract
      index:
        - 0
  target_revision_id:
    -
      plugin: migration_lookup
      migration:
        - paragraph_box
        - paragraph_grid
        - paragraph_text_embedded
      source: value
    -
      plugin: extract
      index:
        - 0

So the field_paragraphs and field_source_paragraphs I understand. But what are these paragraph_ items under migration? Is this where I set the paragraph bundles? And if not where do I set the paragraph bundles and there fields? So where do I begin? What are the right steps to take?

Thanks in advance

2
0

You'll need to create a plugin within your custom module in order to migrate paragraph fields properly. I just finished this process on a large site. I'm paring down the module to make it a bit easier to understand and making it available in a public repository, along with an explanatory video:

https://www.arsnova.cc/drupal-7-drupal-8-paragraph-migration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.