diff --git a/core/modules/filter/migration_templates/d7_filter_format.yml b/core/modules/filter/migration_templates/d7_filter_format.yml index 474b0d4..01f820c 100755 --- a/core/modules/filter/migration_templates/d7_filter_format.yml +++ b/core/modules/filter/migration_templates/d7_filter_format.yml @@ -5,15 +5,7 @@ migration_tags: source: plugin: d7_filter_format process: - format: - - - plugin: machine_name - source: name - - - plugin: dedupe_entity - entity_type: filter_format - field: format - length: 32 + format: format name: name cache: cache filters: filters diff --git a/core/modules/filter/src/Tests/Migrate/d7/MigrateFilterFormatTest.php b/core/modules/filter/src/Tests/Migrate/d7/MigrateFilterFormatTest.php index ef4a574..129c278 100644 --- a/core/modules/filter/src/Tests/Migrate/d7/MigrateFilterFormatTest.php +++ b/core/modules/filter/src/Tests/Migrate/d7/MigrateFilterFormatTest.php @@ -28,6 +28,7 @@ class MigrateFilterFormatTest extends MigrateDrupal7TestBase { */ protected function setUp() { parent::setUp(); + $this->installConfig(static::$modules); $this->executeMigration('d7_filter_format'); } @@ -57,7 +58,11 @@ public function testFilterFormat() { $this->assertEntity('custom_text_format', 'Custom Text format', ['filter_autop', 'filter_html']); $this->assertEntity('filtered_html', 'Filtered HTML', ['filter_autop', 'filter_html', 'filter_htmlcorrector', 'filter_url']); $this->assertEntity('full_html', 'Full HTML', ['filter_autop', 'filter_htmlcorrector', 'filter_url']); - $this->assertEntity('plain_text', 'Plain text', ['filter_autop', 'filter_html_escape', 'filter_url']); + $this->assertEntity('plain_text', 'Plain text', ['filter_html_escape', 'filter_url', 'filter_autop']); + // This assertion covers issue #2555089. Drupal 7 formats are identified + // by machine names, so migrated formats should be merged into existing + // ones. + $this->assertNull(FilterFormat::load('plain_text1')); // Ensure that filter-specific settings were migrated. /** @var \Drupal\filter\FilterFormatInterface $format */