I'm working on a migration from a non-Drupal site into Drupal 9.
So far, I'm using migrate_plus, migrate_tools, and migrate_source_csv modules.
The data I'm importing has <br>
and other tags in some fields. When these import, the <br>
tags are visible on site pages after the migration completes.
The source is a tab delimited file.
Looking at the page code, these are rendering as html entities instead of tags: so <br>
is <br>
I've tried changing settings many different ways in the basic HTML filter these fields use. No change.
I added a plugin for each of these fields that is, I thought, supposed to call the basic_html filter. This also had no impact.
The two fields are field_perm_contact_info and body.
Here's the relevant portion of my import configuration yaml file...
process:
type:
plugin: default_value
default_value: source
field_source_id: srcid
title: title
field_source_country:
plugin: entity_generate
source: country
value_key: name
bundle: country
entity_type: taxonomy_term
ignore_case: true
field_srcfax: fax
field_main_link: mainlink
field_manualyr: manual
field_perm_contact_info:
plugin: default_value
default_value: basic_html
source: permcontinf
field_permpdfname: permpdf
field_perm_scope: permscope
field_perm_updated:
plugin: format_date
from_format: n/j/Y
to_format: Y-m-d
source: permupdated
field_tpop: pop
field_rev_dateleg:
plugin: format_date
from_format: n/j/Y
to_format: Y-m-d
source: revdate
field_short_name: shortname
field_source_iacp_id: srciacpid
body:
plugin: default_value
default_value: basic_html
source: srcnotes
destination:
plugin: entity:node
My basic_html filter has <br>
in the allowed tags list.
If I open an imported node and and resave, boom, it looks fine.
So the question is, how to do the import so that the end result is rendered HTML, not tags displayed as html entities?
A good bit of googling hasn't gotten me to the answer to that yet.