Created
August 22, 2016 09:04
-
-
Save rocketeerbkw/9a2e40025b16edaf7a439989e2183d85 to your computer and use it in GitHub Desktop.
How to migrate multi-value formatted text field in Drupal 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value 0 of field_formatted_text | |
value 1 of field_formatted_text | |
value 2 of field_formatted_text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: example | |
label: 'Example' | |
source: | |
plugin: example | |
keys: | |
- iid | |
process: | |
type: | |
plugin: default_value | |
default_value: example | |
title: title | |
# If I had a single value to migrate, it would look like this. | |
'field_formatted_text/value': source_field | |
'field_formatted_text/format': full_html | |
# I can import the values this way, but how do I also set the format? | |
field_formatted_text: | |
plugin: explode | |
delimiter: "\n" | |
source: source_field | |
destination: | |
plugin: 'entity:node' |
I solved it using this technique: https://drupal.stackexchange.com/questions/254248/possible-to-extract-multiple-key-value-pairs-links-from-string-in-csv-and-migr/261232
Hi @eevensen
Thanks for the help. The method worked for me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How did you solve it?
How can you use the 'explode' plugin and set the 'text format' for each value at the same time?