Currently, the better_formats settings are not being migrated from Drupal 7 to Drupal 8, leaving rich text fields like the body field with the default value, Basic HTML.

Comments

juampynr created an issue. See original summary.

juampynr’s picture

Status: Active » Needs review
StatusFileSize
new48.95 KB
new68.04 KB
new744 bytes

This patch saves better formats settings into each field instance's third party settings. The settings haven't changed their names so just placing them there is enough to get this working.

For example, here is a body field's settings in Drupal 7:

And here is the resulting field after running the d7_field_instance migration.

How to test this patch

Install better_formats and apply this patch. Then, add the Drupal 7 database connection details to the Drupal 8's settings.php. Finally, run these commands:

composer require drupal/migrate_tools:4.x-dev drupal/migrate_upgrade:3.x-dev drupal/migrate_plus:4.x-dev
drush en -y migrate_tools,migrate_upgrade,migrate_plus,better_formats
drush migrate:upgrade --legacy-db-key=drupal7 --legacy-root=/var/www/drupal/drupal7 --configure-only
drush -v migrate:import --execute-dependencies upgrade_d7_field_instance