- Issue created by @ressa
I'd like to concatenate a few lines, containing an address, and keep them on separate lines after import, with this:
constants:
delimiter: ' \r\n '
[...]
process:
field_address:
plugin: concat
source:
- address_line1
- 'constants/delimiter'
- address_line2
- 'constants/delimiter'
- address_line3
... but the backslashes are escaped:
$ drush php:eval --format=json "return \Drupal::service('database')->query('select field_address_value from node_revision__field_address where entity_id=4235')->fetchAll()"
[
{
"field_address_value": "Street Name 25 \\r\\n 10532 City \\r\\n Country"
}
]
Is there a way to avoid backslashes getting escaped, like this?
$ drush php:eval --format=json "return \Drupal::service('database')->query('select field_address_value from node_revision__field_address where entity_id=4235')->fetchAll()"
[
{
"field_address_value": "Street Name 25 \r\n 10532 City \r\n Country"
}
]
Perhaps a callable plugin can be used? https://www.drupal.org/docs/8/api/migrate-api/migrate-process-plugins/pr... →
See also https://drupal.stackexchange.com/questions/286294/migrate-nodes-with-spe...
Active
6.0
Documentation