2

I would like to import 3 different row values into a multiple text formatted long field.

This is my migrate (plus) map yml:

  ...
  field_mytext_formmated:
    plugin: get
    source:
    - dataValueA
    - dataValueB
    - dataValueC
  ...

The data is being migrated but the main problem is that the format property is not being filled so the HTML content is not interpreted. I don't figure out how to set the format to full_html for all fields.

I've seen that for just one field I should use something like:

'body/value': example_matched_field

https://www.drupal.org/docs/8/api/migrate-api/migrate-process-plugins/migrate-process-overview

But it doesn't seem to work with multiple values.

Thanks!

0

There is a plugin named iterator which allows iterate a list of associative fields to a compound field. Example: field_formatted: plugin: iterator source: - fieldA - fieldB process: value: value format: plugin: default_value default_value: 'full_html'

In this case the fields should have this structure [ 'fieldA' => [ 'value' => 'Chicken', ], ]

Can you fields you adapt your source fields to use iterator plugin in this way?

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.