diff -u b/core/modules/comment/migration_templates/d7_comment_type.yml b/core/modules/comment/migration_templates/d7_comment_type.yml --- b/core/modules/comment/migration_templates/d7_comment_type.yml +++ b/core/modules/comment/migration_templates/d7_comment_type.yml @@ -12,6 +12,15 @@ plugin: static_map source: bundle bypass: true + # If the destination site installed the Standard profile, there will + # already be a 'comment' comment type, and the Article node type will be + # using it. To avoid data integrity issues, we want to reuse that comment + # type and the associated field. If the destination site did NOT install + # Standard, this will create the 'comment' comment type. The Forum module, + # meanwhile, also provides its own comment type (comment_forum), which we + # want to reuse if it exists, for the same reason that we want to reuse + # the 'comment' comment type if it exists. + # See https://www.drupal.org/node/2853872 for more information. map: comment_node_article: comment comment_node_forum: comment_forum diff -u b/core/modules/field/migration_templates/d7_field_formatter_settings.yml b/core/modules/field/migration_templates/d7_field_formatter_settings.yml --- b/core/modules/field/migration_templates/d7_field_formatter_settings.yml +++ b/core/modules/field/migration_templates/d7_field_formatter_settings.yml @@ -26,6 +26,10 @@ plugin: skip_on_empty method: row entity_type: entity_type + # The bundle needs to be statically mapped in order to support comment types + # that might already exist before this migration is run. See + # core/modules/comment/migration_templates/d7_comment_type.yml and + # https://www.drupal.org/node/2853872 for more information. bundle: plugin: static_map source: bundle diff -u b/core/modules/field/migration_templates/d7_field_instance.yml b/core/modules/field/migration_templates/d7_field_instance.yml --- b/core/modules/field/migration_templates/d7_field_instance.yml +++ b/core/modules/field/migration_templates/d7_field_instance.yml @@ -11,6 +11,10 @@ process: entity_type: entity_type field_name: field_name + # The bundle needs to be statically mapped in order to support comment types + # that might already exist before this migration is run. See + # core/modules/comment/migration_templates/d7_comment_type.yml and + # https://www.drupal.org/node/2853872 for more information. bundle: plugin: static_map source: bundle diff -u b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml --- b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml +++ b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml @@ -26,6 +26,10 @@ - plugin: skip_on_empty method: row + # The bundle needs to be statically mapped in order to support comment types + # that might already exist before this migration is run. See + # core/modules/comment/migration_templates/d7_comment_type.yml and + # https://www.drupal.org/node/2853872 for more information. bundle: plugin: static_map source: bundle