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!

1 Answer 1

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?

1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.