diff --git a/core/modules/action/migration_templates/action_settings.yml b/core/modules/action/migration_templates/action_settings.yml index df69e33..6df0c2f 100644 --- a/core/modules/action/migration_templates/action_settings.yml +++ b/core/modules/action/migration_templates/action_settings.yml @@ -3,6 +3,7 @@ label: Action configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/action/migration_templates/d6_action.yml b/core/modules/action/migration_templates/d6_action.yml index 592ed18..5b8d236 100644 --- a/core/modules/action/migration_templates/d6_action.yml +++ b/core/modules/action/migration_templates/d6_action.yml @@ -2,6 +2,7 @@ id: d6_action label: Actions migration_tags: - Drupal 6 +audit_ids: true source: plugin: action process: diff --git a/core/modules/action/migration_templates/d7_action.yml b/core/modules/action/migration_templates/d7_action.yml index 03b869a..da9fb54 100644 --- a/core/modules/action/migration_templates/d7_action.yml +++ b/core/modules/action/migration_templates/d7_action.yml @@ -2,6 +2,7 @@ id: d7_action label: Actions migration_tags: - Drupal 7 +audit_ids: true source: plugin: action process: diff --git a/core/modules/aggregator/migration_templates/d6_aggregator_feed.yml b/core/modules/aggregator/migration_templates/d6_aggregator_feed.yml index cad1553..105d09b 100644 --- a/core/modules/aggregator/migration_templates/d6_aggregator_feed.yml +++ b/core/modules/aggregator/migration_templates/d6_aggregator_feed.yml @@ -2,6 +2,7 @@ id: d6_aggregator_feed label: Aggregator feeds migration_tags: - Drupal 6 +audit_ids: true source: plugin: aggregator_feed process: diff --git a/core/modules/aggregator/migration_templates/d6_aggregator_item.yml b/core/modules/aggregator/migration_templates/d6_aggregator_item.yml index e14dbd6..022a780 100644 --- a/core/modules/aggregator/migration_templates/d6_aggregator_item.yml +++ b/core/modules/aggregator/migration_templates/d6_aggregator_item.yml @@ -2,6 +2,7 @@ id: d6_aggregator_item label: Aggregator items migration_tags: - Drupal 6 +audit_ids: true source: plugin: aggregator_item process: diff --git a/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml b/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml index 72372e4..f3abe20 100644 --- a/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml @@ -2,6 +2,7 @@ id: d6_aggregator_settings label: Aggregator configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/aggregator/migration_templates/d7_aggregator_feed.yml b/core/modules/aggregator/migration_templates/d7_aggregator_feed.yml index 5dbeb25..9a038b7 100644 --- a/core/modules/aggregator/migration_templates/d7_aggregator_feed.yml +++ b/core/modules/aggregator/migration_templates/d7_aggregator_feed.yml @@ -2,6 +2,7 @@ id: d7_aggregator_feed label: Aggregator feeds migration_tags: - Drupal 7 +audit_ids: true source: plugin: aggregator_feed process: diff --git a/core/modules/aggregator/migration_templates/d7_aggregator_item.yml b/core/modules/aggregator/migration_templates/d7_aggregator_item.yml index 054ba43..ac76a8c 100644 --- a/core/modules/aggregator/migration_templates/d7_aggregator_item.yml +++ b/core/modules/aggregator/migration_templates/d7_aggregator_item.yml @@ -2,6 +2,7 @@ id: d7_aggregator_item label: Aggregator items migration_tags: - Drupal 7 +audit_ids: true source: plugin: aggregator_item process: diff --git a/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml b/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml index c8c793f..3146955 100644 --- a/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml @@ -2,6 +2,7 @@ id: d7_aggregator_settings label: Aggregator configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/ban/migration_templates/d7_blocked_ips.yml b/core/modules/ban/migration_templates/d7_blocked_ips.yml index 0122dc6..9197cf2 100644 --- a/core/modules/ban/migration_templates/d7_blocked_ips.yml +++ b/core/modules/ban/migration_templates/d7_blocked_ips.yml @@ -2,6 +2,7 @@ id: d7_blocked_ips label: Blocked IPs migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_blocked_ips process: diff --git a/core/modules/block/migration_templates/d6_block.yml b/core/modules/block/migration_templates/d6_block.yml index 1386b18..5d7c9af 100644 --- a/core/modules/block/migration_templates/d6_block.yml +++ b/core/modules/block/migration_templates/d6_block.yml @@ -2,6 +2,7 @@ id: d6_block label: Blocks migration_tags: - Drupal 6 +audit_ids: true source: plugin: block process: diff --git a/core/modules/block/migration_templates/d7_block.yml b/core/modules/block/migration_templates/d7_block.yml index 96b204e..20a81aa 100644 --- a/core/modules/block/migration_templates/d7_block.yml +++ b/core/modules/block/migration_templates/d7_block.yml @@ -2,6 +2,7 @@ id: d7_block label: Blocks migration_tags: - Drupal 7 +audit_ids: true source: plugin: block process: diff --git a/core/modules/block_content/migration_templates/block_content_body_field.yml b/core/modules/block_content/migration_templates/block_content_body_field.yml index b51d032..e3fdda8 100644 --- a/core/modules/block_content/migration_templates/block_content_body_field.yml +++ b/core/modules/block_content/migration_templates/block_content_body_field.yml @@ -3,6 +3,7 @@ label: Block content body field configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: embedded_data data_rows: diff --git a/core/modules/block_content/migration_templates/block_content_entity_display.yml b/core/modules/block_content/migration_templates/block_content_entity_display.yml index 06a35d7..1eb7c73 100644 --- a/core/modules/block_content/migration_templates/block_content_entity_display.yml +++ b/core/modules/block_content/migration_templates/block_content_entity_display.yml @@ -3,6 +3,7 @@ label: Body field display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: embedded_data data_rows: diff --git a/core/modules/block_content/migration_templates/block_content_entity_form_display.yml b/core/modules/block_content/migration_templates/block_content_entity_form_display.yml index 92b5a10..05ba167 100644 --- a/core/modules/block_content/migration_templates/block_content_entity_form_display.yml +++ b/core/modules/block_content/migration_templates/block_content_entity_form_display.yml @@ -3,6 +3,7 @@ label: Body field form display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: embedded_data data_rows: diff --git a/core/modules/block_content/migration_templates/block_content_type.yml b/core/modules/block_content/migration_templates/block_content_type.yml index bc75eea..595b953 100644 --- a/core/modules/block_content/migration_templates/block_content_type.yml +++ b/core/modules/block_content/migration_templates/block_content_type.yml @@ -3,6 +3,7 @@ label: Block content type migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: embedded_data data_rows: diff --git a/core/modules/block_content/migration_templates/d6_custom_block.yml b/core/modules/block_content/migration_templates/d6_custom_block.yml index 55fbcb5..d2826c7 100644 --- a/core/modules/block_content/migration_templates/d6_custom_block.yml +++ b/core/modules/block_content/migration_templates/d6_custom_block.yml @@ -2,6 +2,7 @@ id: d6_custom_block label: Custom blocks migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_box process: diff --git a/core/modules/block_content/migration_templates/d7_custom_block.yml b/core/modules/block_content/migration_templates/d7_custom_block.yml index ca06cf0..1089ca3 100644 --- a/core/modules/block_content/migration_templates/d7_custom_block.yml +++ b/core/modules/block_content/migration_templates/d7_custom_block.yml @@ -2,6 +2,7 @@ id: d7_custom_block label: Custom blocks migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_block_custom process: diff --git a/core/modules/book/migration_templates/d6_book.yml b/core/modules/book/migration_templates/d6_book.yml index 94d7a8f..f075c39 100644 --- a/core/modules/book/migration_templates/d6_book.yml +++ b/core/modules/book/migration_templates/d6_book.yml @@ -2,6 +2,7 @@ id: d6_book label: Books migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_book process: diff --git a/core/modules/book/migration_templates/d6_book_settings.yml b/core/modules/book/migration_templates/d6_book_settings.yml index 16e6695..e508be0 100644 --- a/core/modules/book/migration_templates/d6_book_settings.yml +++ b/core/modules/book/migration_templates/d6_book_settings.yml @@ -2,6 +2,7 @@ id: d6_book_settings label: Book configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/comment/migration_templates/d6_comment.yml b/core/modules/comment/migration_templates/d6_comment.yml index 06820d4..4add74b 100644 --- a/core/modules/comment/migration_templates/d6_comment.yml +++ b/core/modules/comment/migration_templates/d6_comment.yml @@ -2,6 +2,7 @@ id: d6_comment label: Comments migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment constants: diff --git a/core/modules/comment/migration_templates/d6_comment_entity_display.yml b/core/modules/comment/migration_templates/d6_comment_entity_display.yml index c650673..1a086c6 100644 --- a/core/modules/comment/migration_templates/d6_comment_entity_display.yml +++ b/core/modules/comment/migration_templates/d6_comment_entity_display.yml @@ -2,6 +2,7 @@ id: d6_comment_entity_display label: Comment display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable constants: diff --git a/core/modules/comment/migration_templates/d6_comment_entity_form_display.yml b/core/modules/comment/migration_templates/d6_comment_entity_form_display.yml index c33685f..e7462e4 100644 --- a/core/modules/comment/migration_templates/d6_comment_entity_form_display.yml +++ b/core/modules/comment/migration_templates/d6_comment_entity_form_display.yml @@ -2,6 +2,7 @@ id: d6_comment_entity_form_display label: Comment field form display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable constants: diff --git a/core/modules/comment/migration_templates/d6_comment_entity_form_display_subject.yml b/core/modules/comment/migration_templates/d6_comment_entity_form_display_subject.yml index abe6191..589be18 100644 --- a/core/modules/comment/migration_templates/d6_comment_entity_form_display_subject.yml +++ b/core/modules/comment/migration_templates/d6_comment_entity_form_display_subject.yml @@ -2,6 +2,7 @@ id: d6_comment_entity_form_display_subject label: Comment subject form display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable_per_comment_type constants: diff --git a/core/modules/comment/migration_templates/d6_comment_field.yml b/core/modules/comment/migration_templates/d6_comment_field.yml index d14d1aa..2273af0 100644 --- a/core/modules/comment/migration_templates/d6_comment_field.yml +++ b/core/modules/comment/migration_templates/d6_comment_field.yml @@ -2,6 +2,7 @@ id: d6_comment_field label: Comment field configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable_per_comment_type constants: diff --git a/core/modules/comment/migration_templates/d6_comment_field_instance.yml b/core/modules/comment/migration_templates/d6_comment_field_instance.yml index d708619..05c6d16 100644 --- a/core/modules/comment/migration_templates/d6_comment_field_instance.yml +++ b/core/modules/comment/migration_templates/d6_comment_field_instance.yml @@ -2,6 +2,7 @@ id: d6_comment_field_instance label: Comment field instance configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable constants: diff --git a/core/modules/comment/migration_templates/d6_comment_type.yml b/core/modules/comment/migration_templates/d6_comment_type.yml index 69a2bd8..108d39e 100644 --- a/core/modules/comment/migration_templates/d6_comment_type.yml +++ b/core/modules/comment/migration_templates/d6_comment_type.yml @@ -2,6 +2,7 @@ id: d6_comment_type label: Comment type migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_comment_variable_per_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment.yml b/core/modules/comment/migration_templates/d7_comment.yml index 94a2884..c020ab2 100644 --- a/core/modules/comment/migration_templates/d7_comment.yml +++ b/core/modules/comment/migration_templates/d7_comment.yml @@ -2,6 +2,7 @@ id: d7_comment label: Comments migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment constants: diff --git a/core/modules/comment/migration_templates/d7_comment_entity_display.yml b/core/modules/comment/migration_templates/d7_comment_entity_display.yml index 2004505..f116c9f 100644 --- a/core/modules/comment/migration_templates/d7_comment_entity_display.yml +++ b/core/modules/comment/migration_templates/d7_comment_entity_display.yml @@ -2,6 +2,7 @@ id: d7_comment_entity_display label: Comment display configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment_entity_form_display.yml b/core/modules/comment/migration_templates/d7_comment_entity_form_display.yml index 0315c4a..f2bd7a7 100644 --- a/core/modules/comment/migration_templates/d7_comment_entity_form_display.yml +++ b/core/modules/comment/migration_templates/d7_comment_entity_form_display.yml @@ -2,6 +2,7 @@ id: d7_comment_entity_form_display label: Comment field form display configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment_entity_form_display_subject.yml b/core/modules/comment/migration_templates/d7_comment_entity_form_display_subject.yml index c27303e..77c946e 100644 --- a/core/modules/comment/migration_templates/d7_comment_entity_form_display_subject.yml +++ b/core/modules/comment/migration_templates/d7_comment_entity_form_display_subject.yml @@ -2,6 +2,7 @@ id: d7_comment_entity_form_display_subject label: Comment subject form display configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment_field.yml b/core/modules/comment/migration_templates/d7_comment_field.yml index b4b3543..6e4f3d5 100644 --- a/core/modules/comment/migration_templates/d7_comment_field.yml +++ b/core/modules/comment/migration_templates/d7_comment_field.yml @@ -2,6 +2,7 @@ id: d7_comment_field label: Comment field configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment_field_instance.yml b/core/modules/comment/migration_templates/d7_comment_field_instance.yml index 80a1a51..38d68ce 100644 --- a/core/modules/comment/migration_templates/d7_comment_field_instance.yml +++ b/core/modules/comment/migration_templates/d7_comment_field_instance.yml @@ -2,6 +2,7 @@ id: d7_comment_field_instance label: Comment field instance configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/comment/migration_templates/d7_comment_type.yml b/core/modules/comment/migration_templates/d7_comment_type.yml index 090bfdd..0f56dd0 100644 --- a/core/modules/comment/migration_templates/d7_comment_type.yml +++ b/core/modules/comment/migration_templates/d7_comment_type.yml @@ -2,6 +2,7 @@ id: d7_comment_type label: Comment type migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_comment_type constants: diff --git a/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml index 1c99961..5ef98be 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml @@ -2,6 +2,7 @@ id: d6_i18n_system_maintenance label: Maintenance page configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: i18n_variable variables: diff --git a/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml index 3c80821..234092e 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml @@ -2,6 +2,7 @@ id: d6_i18n_system_site label: Site configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: i18n_variable constants: diff --git a/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml index d1e5db5..9ff138d 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml @@ -2,6 +2,7 @@ id: d6_i18n_user_mail label: User mail configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: i18n_variable variables: diff --git a/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml index f2c6f95..519611f 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml @@ -2,6 +2,7 @@ id: d6_i18n_user_profile_field_instance label: User profile field instance configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_i18n_profile_field constants: diff --git a/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml index 36b0fa6c..233988e 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml @@ -2,6 +2,7 @@ id: d6_i18n_user_settings label: User configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: i18n_variable variables: diff --git a/core/modules/contact/migration_templates/contact_category.yml b/core/modules/contact/migration_templates/contact_category.yml index 3d89a6f..2aef59f 100644 --- a/core/modules/contact/migration_templates/contact_category.yml +++ b/core/modules/contact/migration_templates/contact_category.yml @@ -3,6 +3,7 @@ label: Contact category configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: contact_category process: diff --git a/core/modules/contact/migration_templates/d6_contact_settings.yml b/core/modules/contact/migration_templates/d6_contact_settings.yml index dbe0205..78f70ec 100644 --- a/core/modules/contact/migration_templates/d6_contact_settings.yml +++ b/core/modules/contact/migration_templates/d6_contact_settings.yml @@ -2,6 +2,7 @@ id: d6_contact_settings label: Contact configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: contact_settings variables: diff --git a/core/modules/contact/migration_templates/d7_contact_settings.yml b/core/modules/contact/migration_templates/d7_contact_settings.yml index 9feebe5..9208e2e 100644 --- a/core/modules/contact/migration_templates/d7_contact_settings.yml +++ b/core/modules/contact/migration_templates/d7_contact_settings.yml @@ -2,6 +2,7 @@ id: d7_contact_settings label: Contact configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: contact_settings variables: diff --git a/core/modules/dblog/migration_templates/d6_dblog_settings.yml b/core/modules/dblog/migration_templates/d6_dblog_settings.yml index 64da0a7..e302494 100644 --- a/core/modules/dblog/migration_templates/d6_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d6_dblog_settings.yml @@ -2,6 +2,7 @@ id: d6_dblog_settings label: Database logging configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/dblog/migration_templates/d7_dblog_settings.yml b/core/modules/dblog/migration_templates/d7_dblog_settings.yml index e22768f..f2f40b6 100644 --- a/core/modules/dblog/migration_templates/d7_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d7_dblog_settings.yml @@ -2,6 +2,7 @@ id: d7_dblog_settings label: Database logging configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/field/migration_templates/d6_field.yml b/core/modules/field/migration_templates/d6_field.yml index eb02178..2fdd249 100644 --- a/core/modules/field/migration_templates/d6_field.yml +++ b/core/modules/field/migration_templates/d6_field.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processField +audit_ids: true source: plugin: d6_field constants: diff --git a/core/modules/field/migration_templates/d6_field_formatter_settings.yml b/core/modules/field/migration_templates/d6_field_formatter_settings.yml index 534501d..7f4df4f 100644 --- a/core/modules/field/migration_templates/d6_field_formatter_settings.yml +++ b/core/modules/field/migration_templates/d6_field_formatter_settings.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldFormatter +audit_ids: true source: plugin: d6_field_instance_per_view_mode constants: diff --git a/core/modules/field/migration_templates/d6_field_instance.yml b/core/modules/field/migration_templates/d6_field_instance.yml index 1934303..61bbbad 100644 --- a/core/modules/field/migration_templates/d6_field_instance.yml +++ b/core/modules/field/migration_templates/d6_field_instance.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldInstance +audit_ids: true source: plugin: d6_field_instance constants: diff --git a/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml b/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml index 85c7036..a8473c9 100644 --- a/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml +++ b/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldWidget +audit_ids: true source: plugin: d6_field_instance_per_form_display constants: diff --git a/core/modules/field/migration_templates/d7_field.yml b/core/modules/field/migration_templates/d7_field.yml index 15079d8..b0819ca 100644 --- a/core/modules/field/migration_templates/d7_field.yml +++ b/core/modules/field/migration_templates/d7_field.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processField +audit_ids: true source: plugin: d7_field constants: diff --git a/core/modules/field/migration_templates/d7_field_formatter_settings.yml b/core/modules/field/migration_templates/d7_field_formatter_settings.yml index 126fd29..de3266a 100644 --- a/core/modules/field/migration_templates/d7_field_formatter_settings.yml +++ b/core/modules/field/migration_templates/d7_field_formatter_settings.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldFormatter +audit_ids: true source: plugin: d7_field_instance_per_view_mode constants: diff --git a/core/modules/field/migration_templates/d7_field_instance.yml b/core/modules/field/migration_templates/d7_field_instance.yml index f3518c9..6cc025e 100644 --- a/core/modules/field/migration_templates/d7_field_instance.yml +++ b/core/modules/field/migration_templates/d7_field_instance.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldInstance +audit_ids: true source: plugin: d7_field_instance constants: diff --git a/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml index e2bbcf4..e35d02e 100644 --- a/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml +++ b/core/modules/field/migration_templates/d7_field_instance_widget_settings.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration cck_plugin_method: processFieldWidget +audit_ids: true source: plugin: d7_field_instance_per_form_display constants: diff --git a/core/modules/field/migration_templates/d7_view_modes.yml b/core/modules/field/migration_templates/d7_view_modes.yml index fd17138..4f1a216 100644 --- a/core/modules/field/migration_templates/d7_view_modes.yml +++ b/core/modules/field/migration_templates/d7_view_modes.yml @@ -2,6 +2,7 @@ id: d7_view_modes label: View modes migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_view_mode process: diff --git a/core/modules/file/migration_templates/d6_file.yml b/core/modules/file/migration_templates/d6_file.yml index 8371d45..8589978 100644 --- a/core/modules/file/migration_templates/d6_file.yml +++ b/core/modules/file/migration_templates/d6_file.yml @@ -4,6 +4,7 @@ id: d6_file label: Files migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_file constants: diff --git a/core/modules/file/migration_templates/d6_upload.yml b/core/modules/file/migration_templates/d6_upload.yml index a497099..0942e10 100644 --- a/core/modules/file/migration_templates/d6_upload.yml +++ b/core/modules/file/migration_templates/d6_upload.yml @@ -2,6 +2,7 @@ id: d6_upload label: File uploads migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_upload process: diff --git a/core/modules/file/migration_templates/d6_upload_entity_display.yml b/core/modules/file/migration_templates/d6_upload_entity_display.yml index 576bb68..504622e 100644 --- a/core/modules/file/migration_templates/d6_upload_entity_display.yml +++ b/core/modules/file/migration_templates/d6_upload_entity_display.yml @@ -2,6 +2,7 @@ id: d6_upload_entity_display label: Upload display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_upload_instance constants: diff --git a/core/modules/file/migration_templates/d6_upload_entity_form_display.yml b/core/modules/file/migration_templates/d6_upload_entity_form_display.yml index 055749a..9a024c1 100644 --- a/core/modules/file/migration_templates/d6_upload_entity_form_display.yml +++ b/core/modules/file/migration_templates/d6_upload_entity_form_display.yml @@ -2,6 +2,7 @@ id: d6_upload_entity_form_display label: Upload form display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_upload_instance constants: diff --git a/core/modules/file/migration_templates/d6_upload_field.yml b/core/modules/file/migration_templates/d6_upload_field.yml index a919f91..55c103d 100644 --- a/core/modules/file/migration_templates/d6_upload_field.yml +++ b/core/modules/file/migration_templates/d6_upload_field.yml @@ -2,6 +2,7 @@ id: d6_upload_field label: Upload field configuration migration_tags: - Drupal 6 +audit_ids: true source: # We do an empty source and a proper destination to have an idmap for # migration_dependencies. diff --git a/core/modules/file/migration_templates/d6_upload_field_instance.yml b/core/modules/file/migration_templates/d6_upload_field_instance.yml index 732153a..baec1c6 100644 --- a/core/modules/file/migration_templates/d6_upload_field_instance.yml +++ b/core/modules/file/migration_templates/d6_upload_field_instance.yml @@ -2,6 +2,7 @@ id: d6_upload_field_instance label: Upload field instance configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_upload_instance constants: diff --git a/core/modules/file/migration_templates/d7_file.yml b/core/modules/file/migration_templates/d7_file.yml index 3fee046..8bc2147 100644 --- a/core/modules/file/migration_templates/d7_file.yml +++ b/core/modules/file/migration_templates/d7_file.yml @@ -4,6 +4,7 @@ id: d7_file label: Files migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_file scheme: public diff --git a/core/modules/file/migration_templates/d7_file_private.yml b/core/modules/file/migration_templates/d7_file_private.yml index 9c6b8e2..d2e7c89 100644 --- a/core/modules/file/migration_templates/d7_file_private.yml +++ b/core/modules/file/migration_templates/d7_file_private.yml @@ -2,6 +2,7 @@ id: d7_file_private label: Files migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_file scheme: private diff --git a/core/modules/file/migration_templates/file_settings.yml b/core/modules/file/migration_templates/file_settings.yml index 36584cc..dd89979 100644 --- a/core/modules/file/migration_templates/file_settings.yml +++ b/core/modules/file/migration_templates/file_settings.yml @@ -3,6 +3,7 @@ label: File configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/filter/migration_templates/d6_filter_format.yml b/core/modules/filter/migration_templates/d6_filter_format.yml index d6bf7f2..971473e 100644 --- a/core/modules/filter/migration_templates/d6_filter_format.yml +++ b/core/modules/filter/migration_templates/d6_filter_format.yml @@ -2,6 +2,7 @@ id: d6_filter_format label: Filter format configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_filter_format process: diff --git a/core/modules/filter/migration_templates/d7_filter_format.yml b/core/modules/filter/migration_templates/d7_filter_format.yml index 3bac484..7ff22ed 100644 --- a/core/modules/filter/migration_templates/d7_filter_format.yml +++ b/core/modules/filter/migration_templates/d7_filter_format.yml @@ -2,6 +2,7 @@ id: d7_filter_format label: Filter format configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_filter_format process: diff --git a/core/modules/filter/migration_templates/d7_filter_settings.yml b/core/modules/filter/migration_templates/d7_filter_settings.yml index d6239fc..7ac6ab6 100644 --- a/core/modules/filter/migration_templates/d7_filter_settings.yml +++ b/core/modules/filter/migration_templates/d7_filter_settings.yml @@ -2,6 +2,7 @@ id: d7_filter_settings label: Drupal 7 filter settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/forum/migration_templates/d6_forum_settings.yml b/core/modules/forum/migration_templates/d6_forum_settings.yml index 18ba8d4..84e1911 100644 --- a/core/modules/forum/migration_templates/d6_forum_settings.yml +++ b/core/modules/forum/migration_templates/d6_forum_settings.yml @@ -2,6 +2,7 @@ id: d6_forum_settings label: Forum configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/forum/migration_templates/d7_forum_settings.yml b/core/modules/forum/migration_templates/d7_forum_settings.yml index 086d3e6..64dae17 100644 --- a/core/modules/forum/migration_templates/d7_forum_settings.yml +++ b/core/modules/forum/migration_templates/d7_forum_settings.yml @@ -2,6 +2,7 @@ id: d7_forum_settings label: Forum configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/image/migration_templates/d6_imagecache_presets.yml b/core/modules/image/migration_templates/d6_imagecache_presets.yml index bda0258..30a3410 100644 --- a/core/modules/image/migration_templates/d6_imagecache_presets.yml +++ b/core/modules/image/migration_templates/d6_imagecache_presets.yml @@ -2,6 +2,7 @@ id: d6_imagecache_presets label: ImageCache Presets migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_imagecache_presets process: diff --git a/core/modules/image/migration_templates/d7_image_settings.yml b/core/modules/image/migration_templates/d7_image_settings.yml index bfae4d5..74c75b1 100644 --- a/core/modules/image/migration_templates/d7_image_settings.yml +++ b/core/modules/image/migration_templates/d7_image_settings.yml @@ -2,6 +2,7 @@ id: d7_image_settings label: Image configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/image/migration_templates/d7_image_styles.yml b/core/modules/image/migration_templates/d7_image_styles.yml index b2b14b0..bced009 100644 --- a/core/modules/image/migration_templates/d7_image_styles.yml +++ b/core/modules/image/migration_templates/d7_image_styles.yml @@ -2,6 +2,7 @@ id: d7_image_styles label: Image styles migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_image_styles process: diff --git a/core/modules/language/migration_templates/d6_language_content_settings.yml b/core/modules/language/migration_templates/d6_language_content_settings.yml index 3bf9078..b726781 100644 --- a/core/modules/language/migration_templates/d6_language_content_settings.yml +++ b/core/modules/language/migration_templates/d6_language_content_settings.yml @@ -3,6 +3,7 @@ label: Drupal 6 language content settings migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_language_content_settings constants: diff --git a/core/modules/language/migration_templates/d6_language_negotiation_settings.yml b/core/modules/language/migration_templates/d6_language_negotiation_settings.yml index abc71f6..87eb9ef 100644 --- a/core/modules/language/migration_templates/d6_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d6_language_negotiation_settings.yml @@ -2,6 +2,7 @@ id: d6_language_negotiation_settings label: Language negotiation settings migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/language/migration_templates/d6_language_types.yml b/core/modules/language/migration_templates/d6_language_types.yml index 05ce300..a803b3e 100644 --- a/core/modules/language/migration_templates/d6_language_types.yml +++ b/core/modules/language/migration_templates/d6_language_types.yml @@ -2,6 +2,7 @@ id: d6_language_types label: Language types migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/language/migration_templates/d7_language_content_settings.yml b/core/modules/language/migration_templates/d7_language_content_settings.yml index 09437fa..17ceeac 100644 --- a/core/modules/language/migration_templates/d7_language_content_settings.yml +++ b/core/modules/language/migration_templates/d7_language_content_settings.yml @@ -2,6 +2,7 @@ id: d7_language_content_settings label: Drupal 7 language content settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_language_content_settings constants: diff --git a/core/modules/language/migration_templates/d7_language_negotiation_settings.yml b/core/modules/language/migration_templates/d7_language_negotiation_settings.yml index 7759965..6b18267 100644 --- a/core/modules/language/migration_templates/d7_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d7_language_negotiation_settings.yml @@ -2,6 +2,7 @@ id: d7_language_negotiation_settings label: Language negotiation settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/language/migration_templates/d7_language_types.yml b/core/modules/language/migration_templates/d7_language_types.yml index 3a634a2..c74e6b1 100644 --- a/core/modules/language/migration_templates/d7_language_types.yml +++ b/core/modules/language/migration_templates/d7_language_types.yml @@ -2,6 +2,7 @@ id: d7_language_types label: Language types migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/language/migration_templates/default_language.yml b/core/modules/language/migration_templates/default_language.yml index 6d7604d..c75dbb4 100644 --- a/core/modules/language/migration_templates/default_language.yml +++ b/core/modules/language/migration_templates/default_language.yml @@ -3,6 +3,7 @@ label: Default language migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/language/migration_templates/language.yml b/core/modules/language/migration_templates/language.yml index 6ca9c6d..1f47e4a 100644 --- a/core/modules/language/migration_templates/language.yml +++ b/core/modules/language/migration_templates/language.yml @@ -3,6 +3,7 @@ label: Languages migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: language process: diff --git a/core/modules/language/migration_templates/language_prefixes_and_domains.yml b/core/modules/language/migration_templates/language_prefixes_and_domains.yml index edc5b54..6c57019 100644 --- a/core/modules/language/migration_templates/language_prefixes_and_domains.yml +++ b/core/modules/language/migration_templates/language_prefixes_and_domains.yml @@ -3,6 +3,7 @@ label: Language prefixes and domains migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: language fetch_all: true diff --git a/core/modules/locale/migration_templates/locale_settings.yml b/core/modules/locale/migration_templates/locale_settings.yml index 6eebe20..c9c2e5e 100644 --- a/core/modules/locale/migration_templates/locale_settings.yml +++ b/core/modules/locale/migration_templates/locale_settings.yml @@ -3,6 +3,7 @@ label: Locale configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/menu_link_content/migration_templates/d6_menu_links.yml b/core/modules/menu_link_content/migration_templates/d6_menu_links.yml index 2c8ad4a..2a79d35 100644 --- a/core/modules/menu_link_content/migration_templates/d6_menu_links.yml +++ b/core/modules/menu_link_content/migration_templates/d6_menu_links.yml @@ -2,6 +2,7 @@ id: d6_menu_links label: Menu links migration_tags: - Drupal 6 +audit_ids: true source: plugin: menu_link process: diff --git a/core/modules/menu_link_content/migration_templates/d7_menu_links.yml b/core/modules/menu_link_content/migration_templates/d7_menu_links.yml index 200a792..854a056 100644 --- a/core/modules/menu_link_content/migration_templates/d7_menu_links.yml +++ b/core/modules/menu_link_content/migration_templates/d7_menu_links.yml @@ -2,6 +2,7 @@ id: d7_menu_links label: Menu links migration_tags: - Drupal 7 +audit_ids: true source: plugin: menu_link constants: diff --git a/core/modules/menu_ui/migration_templates/menu_settings.yml b/core/modules/menu_ui/migration_templates/menu_settings.yml index dee5f9e..de1f975 100644 --- a/core/modules/menu_ui/migration_templates/menu_settings.yml +++ b/core/modules/menu_ui/migration_templates/menu_settings.yml @@ -4,6 +4,7 @@ label: Menu UI configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/migrate/migrate.services.yml b/core/modules/migrate/migrate.services.yml index 1a4f64d..1b95191 100644 --- a/core/modules/migrate/migrate.services.yml +++ b/core/modules/migrate/migrate.services.yml @@ -30,3 +30,5 @@ services: plugin.manager.migration: class: Drupal\migrate\Plugin\MigrationPluginManager arguments: ['@module_handler', '@cache.discovery_migration', '@language_manager'] + migrate.id_auditor: + class: Drupal\migrate\MigrateIdAuditor diff --git a/core/modules/migrate/src/MigrateIdAuditor.php b/core/modules/migrate/src/MigrateIdAuditor.php new file mode 100644 index 0000000..0b6a3b9 --- /dev/null +++ b/core/modules/migrate/src/MigrateIdAuditor.php @@ -0,0 +1,36 @@ +getDestinationPlugin(); + if ($destination instanceof MigrateIdAuditInterface) { + if ($destination->unsafeIdsExist($migration->getIdMap())) { + $ret[$destination->entityTypeId()] = TRUE; + } + } + } + return array_keys($ret); + } + +} diff --git a/core/modules/migrate/src/Plugin/MigrateIdAuditInterface.php b/core/modules/migrate/src/Plugin/MigrateIdAuditInterface.php new file mode 100644 index 0000000..6837068 --- /dev/null +++ b/core/modules/migrate/src/Plugin/MigrateIdAuditInterface.php @@ -0,0 +1,39 @@ +getSettings(); } + /** + * Get the highest ID that exists for this destination. + * + * This is not the highest ID that has been migrated, but the highest ID + * that exists in the destination, eg: highest node ID on the site. + * + * @return int + * The highest ID value found. If no IDs at all are found, or if the + * concept of a highest ID is not meaningful, zero should be returned. + */ + protected function highestDestinationId() { + $query = $this->storage->getQuery() + ->sort($this->getHighestIdField(), 'DESC') + ->range(0, 1); + $found = $query->execute(); + return (int) reset($found); + } + + /** + * {@inheritdoc} + */ + public function getHighestIdField() { + return $this->getKey('id'); + } + + /** + * Check whether unsafe IDs exist that should inhibit migration. + * + * @param \Drupal\migrate\Plugin\MigrateIdMapInterface $idMap + * The ID map for this migration. + * + * @return bool + * Whether unsafe IDs exist. + */ + public function unsafeIdsExist(MigrateIdMapInterface $idMap) { + // If IDs are are audited, we can't have conflicts. + if (!empty($this->migration->getPluginDefinition()['audit_ids'])) { + if (!($idMap instanceof MigrateMaxIdInterface)) { + // We don't know how to audit IDs without a cooperating ID map. + return FALSE; + } + $highestMigrated = $idMap->getMaxId($this->getHighestIdField()); + if ($this->highestDestinationId() > $highestMigrated) { + // There's a new ID that we might conflict with! + return TRUE; + } + } + } + + /** + * {@inheritdoc} + */ + public function entityTypeId() { + return $this->storage->getEntityTypeId(); + } + } diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php index b0db476..b646059 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php @@ -78,4 +78,11 @@ public function getIds() { throw new MigrateException('This entity type does not support revisions.'); } + /** + * {@inheritdoc} + */ + public function getHighestIdField() { + return $this->getKey('revision'); + } + } diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php index 27b7569..2b6e30c 100644 --- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php +++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php @@ -6,6 +6,7 @@ use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Plugin\PluginBase; +use Drupal\migrate\Plugin\MigrateMaxIdInterface; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Event\MigrateIdMapMessageEvent; use Drupal\migrate\MigrateException; @@ -26,7 +27,7 @@ * * @PluginID("sql") */ -class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryPluginInterface { +class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryPluginInterface, MigrateMaxIdInterface { /** * Column name of hashed source id values. @@ -923,4 +924,22 @@ public function valid() { return $this->currentRow !== FALSE; } + /** + * {@inheritdoc} + */ + public function getMaxId($field) { + if (!$this->getDatabase()->schema()->tableExists($this->mapTableName())) { + return 0; + } + + $sqlField = $this->destinationIdFields()[$field]; + + $query = $this->getDatabase()->select($this->mapTableName(), 'map') + ->fields('map', [$sqlField]) + ->orderBy($sqlField, 'DESC') + ->range(0, 1); + $found = $query->execute()->fetchField(); + return (int) $found; + } + } diff --git a/core/modules/migrate/tests/modules/migrate_high_water_test/migration_templates/migrate.migration.high_water_test.yml b/core/modules/migrate/tests/modules/migrate_high_water_test/migration_templates/migrate.migration.high_water_test.yml index 6a86577..73f32a8 100644 --- a/core/modules/migrate/tests/modules/migrate_high_water_test/migration_templates/migrate.migration.high_water_test.yml +++ b/core/modules/migrate/tests/modules/migrate_high_water_test/migration_templates/migrate.migration.high_water_test.yml @@ -1,5 +1,6 @@ id: high_water_test label: High water test. +audit_ids: true source: plugin: high_water_test high_water_property: diff --git a/core/modules/migrate_drupal/tests/modules/migrate_overwrite_test/migration_templates/users.yml b/core/modules/migrate_drupal/tests/modules/migrate_overwrite_test/migration_templates/users.yml index e23d90d..0bddcf4 100644 --- a/core/modules/migrate_drupal/tests/modules/migrate_overwrite_test/migration_templates/users.yml +++ b/core/modules/migrate_drupal/tests/modules/migrate_overwrite_test/migration_templates/users.yml @@ -3,6 +3,7 @@ label: User migration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: d6_user process: diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index c87247e..d757647 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -3,11 +3,13 @@ namespace Drupal\migrate_drupal_ui\Form; use Drupal\Core\Datetime\DateFormatterInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\RendererInterface; use Drupal\Core\State\StateInterface; use Drupal\Core\Url; +use Drupal\migrate\MigrateIdAuditor; use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate_drupal_ui\Batch\MigrateUpgradeImportBatch; use Drupal\migrate_drupal\MigrationConfigurationTrait; @@ -713,6 +715,20 @@ class MigrateUpgradeForm extends ConfirmFormBase { protected $pluginManager; /** + * The entity type manager. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface + */ + protected $entityTypeManager; + + /** + * The ID conflict auditor. + * + * @var \Drupal\migrate\MigrateIdAuditor $idAuditor + */ + protected $idAuditor; + + /** * Constructs the MigrateUpgradeForm. * * @param \Drupal\Core\State\StateInterface $state @@ -723,12 +739,18 @@ class MigrateUpgradeForm extends ConfirmFormBase { * The renderer service. * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager * The migration plugin manager. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager + * The entity type manager. + * @param \Drupal\migrate\MigrateIdAuditor $idAuditor + * The ID conflict auditor. */ - public function __construct(StateInterface $state, DateFormatterInterface $date_formatter, RendererInterface $renderer, MigrationPluginManagerInterface $plugin_manager) { + public function __construct(StateInterface $state, DateFormatterInterface $date_formatter, RendererInterface $renderer, MigrationPluginManagerInterface $plugin_manager, EntityTypeManagerInterface $entityTypeManager, MigrateIdAuditor $idAuditor) { $this->state = $state; $this->dateFormatter = $date_formatter; $this->renderer = $renderer; $this->pluginManager = $plugin_manager; + $this->entityTypeManager = $entityTypeManager; + $this->idAuditor = $idAuditor; } /** @@ -739,7 +761,9 @@ public static function create(ContainerInterface $container) { $container->get('state'), $container->get('date.formatter'), $container->get('renderer'), - $container->get('plugin.manager.migration') + $container->get('plugin.manager.migration'), + $container->get('entity_type.manager'), + $container->get('migrate.id_auditor') ); } @@ -762,6 +786,9 @@ public function buildForm(array $form, FormStateInterface $form_state) { case 'credentials': return $this->buildCredentialForm($form, $form_state); + case 'confirm_id_conflicts': + return $this->buildIdConflictForm($form, $form_state); + case 'confirm': return $this->buildConfirmForm($form, $form_state); @@ -1082,6 +1109,64 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st */ public function submitCredentialForm(array &$form, FormStateInterface $form_state) { // Indicate the next step is confirmation. + $form_state->set('step', 'confirm_id_conflicts'); + $form_state->setRebuild(); + } + + /** + * Confirmation form for ID conflicts. + * + * @param array $form + * An associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. + * + * @return array + * The form structure. + */ + public function buildIdConflictForm(array &$form, FormStateInterface $form_state) { + // Check if there are conflicts. If none, just skip this form! + $migrationIds = array_keys($form_state->get('migrations')); + $migrations = $this->pluginManager->createInstances($migrationIds); + $typeIds = $this->idAuditor->auditIds($migrations); + if (empty($typeIds)) { + $form_state->set('step', 'confirm'); + return $this->buildForm($form, $form_state); + } + + $form = parent::buildForm($form, $form_state); + $form['actions']['submit']['#submit'] = ['::submitConfirmIdConflictForm']; + $form['actions']['submit']['#value'] = $this->t('I acknowledge I may lose data, continue anyway.'); + + $form['warning'] = [ + '#type' => 'markup', + '#markup' => '

' . $this->t('Entities may be overwritten') . '

' . + '

' . $this->t('Upgrades work on brand new sites, or sites with previously upgraded data. However, it looks like you have added other entities to your site, perhaps manually. These new entities may be overwritten if you run this upgrade.') . '

', + ]; + + $items = []; + sort($typeIds); + foreach ($typeIds as $typeId) { + $items[] = $this->entityTypeManager->getDefinition($typeId)->getLabel(); + } + $form['type_list'] = [ + '#title' => $this->t('These entities are of the following types:'), + '#theme' => 'item_list', + '#items' => $items, + ]; + + return $form; + } + + /** + * Submission handler for the confirmation form. + * + * @param array $form + * An associative array containing the structure of the form. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. + */ + public function submitConfirmIdConflictForm(array &$form, FormStateInterface $form_state) { $form_state->set('step', 'confirm'); $form_state->setRebuild(); } diff --git a/core/modules/node/migration_templates/d6_node.yml b/core/modules/node/migration_templates/d6_node.yml index 56d0459..1bcae10 100644 --- a/core/modules/node/migration_templates/d6_node.yml +++ b/core/modules/node/migration_templates/d6_node.yml @@ -3,6 +3,7 @@ label: Nodes migration_tags: - Drupal 6 deriver: Drupal\node\Plugin\migrate\D6NodeDeriver +audit_ids: true source: plugin: d6_node process: diff --git a/core/modules/node/migration_templates/d6_node_revision.yml b/core/modules/node/migration_templates/d6_node_revision.yml index f4ff301..ec44d58 100644 --- a/core/modules/node/migration_templates/d6_node_revision.yml +++ b/core/modules/node/migration_templates/d6_node_revision.yml @@ -3,6 +3,7 @@ label: Node revisions migration_tags: - Drupal 6 deriver: Drupal\node\Plugin\migrate\D6NodeDeriver +audit_ids: true source: plugin: d6_node_revision process: diff --git a/core/modules/node/migration_templates/d6_node_setting_promote.yml b/core/modules/node/migration_templates/d6_node_setting_promote.yml index 469083d..4072252 100644 --- a/core/modules/node/migration_templates/d6_node_setting_promote.yml +++ b/core/modules/node/migration_templates/d6_node_setting_promote.yml @@ -2,6 +2,7 @@ id: d6_node_setting_promote label: Node type 'promote' setting migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_node_type constants: diff --git a/core/modules/node/migration_templates/d6_node_setting_status.yml b/core/modules/node/migration_templates/d6_node_setting_status.yml index 7c5a8de..e539791 100644 --- a/core/modules/node/migration_templates/d6_node_setting_status.yml +++ b/core/modules/node/migration_templates/d6_node_setting_status.yml @@ -2,6 +2,7 @@ id: d6_node_setting_status label: Node type 'status' setting migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_node_type constants: diff --git a/core/modules/node/migration_templates/d6_node_setting_sticky.yml b/core/modules/node/migration_templates/d6_node_setting_sticky.yml index 77ad6cd..d992e06 100644 --- a/core/modules/node/migration_templates/d6_node_setting_sticky.yml +++ b/core/modules/node/migration_templates/d6_node_setting_sticky.yml @@ -2,6 +2,7 @@ id: d6_node_setting_sticky label: Node type 'sticky' setting migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_node_type constants: diff --git a/core/modules/node/migration_templates/d6_node_settings.yml b/core/modules/node/migration_templates/d6_node_settings.yml index 17b0857..2994caa 100644 --- a/core/modules/node/migration_templates/d6_node_settings.yml +++ b/core/modules/node/migration_templates/d6_node_settings.yml @@ -2,6 +2,7 @@ id: d6_node_settings label: Node configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/node/migration_templates/d6_node_translation.yml b/core/modules/node/migration_templates/d6_node_translation.yml index 3eb06e8..0f6579e 100644 --- a/core/modules/node/migration_templates/d6_node_translation.yml +++ b/core/modules/node/migration_templates/d6_node_translation.yml @@ -3,6 +3,7 @@ label: Node translations migration_tags: - Drupal 6 deriver: Drupal\node\Plugin\migrate\D6NodeDeriver +audit_ids: true source: plugin: d6_node translations: true diff --git a/core/modules/node/migration_templates/d6_node_type.yml b/core/modules/node/migration_templates/d6_node_type.yml index 5587ef5..1edbd16 100644 --- a/core/modules/node/migration_templates/d6_node_type.yml +++ b/core/modules/node/migration_templates/d6_node_type.yml @@ -2,6 +2,7 @@ id: d6_node_type label: Node type configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_node_type constants: diff --git a/core/modules/node/migration_templates/d6_view_modes.yml b/core/modules/node/migration_templates/d6_view_modes.yml index 815709b..ab5fe6d 100644 --- a/core/modules/node/migration_templates/d6_view_modes.yml +++ b/core/modules/node/migration_templates/d6_view_modes.yml @@ -2,6 +2,7 @@ id: d6_view_modes label: View modes migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_view_mode constants: diff --git a/core/modules/node/migration_templates/d7_node.yml b/core/modules/node/migration_templates/d7_node.yml index 5de3055..824662f 100644 --- a/core/modules/node/migration_templates/d7_node.yml +++ b/core/modules/node/migration_templates/d7_node.yml @@ -3,6 +3,7 @@ label: Nodes migration_tags: - Drupal 7 deriver: Drupal\node\Plugin\migrate\D7NodeDeriver +audit_ids: true source: plugin: d7_node process: diff --git a/core/modules/node/migration_templates/d7_node_revision.yml b/core/modules/node/migration_templates/d7_node_revision.yml index c6081ef..420fe58 100644 --- a/core/modules/node/migration_templates/d7_node_revision.yml +++ b/core/modules/node/migration_templates/d7_node_revision.yml @@ -3,6 +3,7 @@ label: Node revisions migration_tags: - Drupal 7 deriver: Drupal\node\Plugin\migrate\D7NodeDeriver +audit_ids: true source: plugin: d7_node_revision process: diff --git a/core/modules/node/migration_templates/d7_node_settings.yml b/core/modules/node/migration_templates/d7_node_settings.yml index 0461754..13a87f5 100644 --- a/core/modules/node/migration_templates/d7_node_settings.yml +++ b/core/modules/node/migration_templates/d7_node_settings.yml @@ -2,6 +2,7 @@ id: d7_node_settings label: Node configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/node/migration_templates/d7_node_title_label.yml b/core/modules/node/migration_templates/d7_node_title_label.yml index 53ae6ea..ea1f740 100644 --- a/core/modules/node/migration_templates/d7_node_title_label.yml +++ b/core/modules/node/migration_templates/d7_node_title_label.yml @@ -2,6 +2,7 @@ id: d7_node_title_label label: Node title label migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_node_type constants: diff --git a/core/modules/node/migration_templates/d7_node_translation.yml b/core/modules/node/migration_templates/d7_node_translation.yml index 11dfbb7..5a073d7 100644 --- a/core/modules/node/migration_templates/d7_node_translation.yml +++ b/core/modules/node/migration_templates/d7_node_translation.yml @@ -4,6 +4,7 @@ migration_tags: - Drupal 7 - translation deriver: Drupal\node\Plugin\migrate\D7NodeDeriver +audit_ids: true source: plugin: d7_node translations: true diff --git a/core/modules/node/migration_templates/d7_node_type.yml b/core/modules/node/migration_templates/d7_node_type.yml index f61bad8..c3d0924 100644 --- a/core/modules/node/migration_templates/d7_node_type.yml +++ b/core/modules/node/migration_templates/d7_node_type.yml @@ -2,6 +2,7 @@ id: d7_node_type label: Node type configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_node_type constants: diff --git a/core/modules/path/migration_templates/d6_url_alias.yml b/core/modules/path/migration_templates/d6_url_alias.yml index fcf2036..f9c604c 100644 --- a/core/modules/path/migration_templates/d6_url_alias.yml +++ b/core/modules/path/migration_templates/d6_url_alias.yml @@ -2,6 +2,7 @@ id: d6_url_alias label: URL aliases migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_url_alias constants: diff --git a/core/modules/path/migration_templates/d7_url_alias.yml b/core/modules/path/migration_templates/d7_url_alias.yml index dffaf46..12a985c 100644 --- a/core/modules/path/migration_templates/d7_url_alias.yml +++ b/core/modules/path/migration_templates/d7_url_alias.yml @@ -2,6 +2,7 @@ id: d7_url_alias label: URL aliases migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_url_alias constants: diff --git a/core/modules/search/migration_templates/d6_search_settings.yml b/core/modules/search/migration_templates/d6_search_settings.yml index 28f8600..20277e2 100644 --- a/core/modules/search/migration_templates/d6_search_settings.yml +++ b/core/modules/search/migration_templates/d6_search_settings.yml @@ -2,6 +2,7 @@ id: d6_search_settings label: Search configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable constants: diff --git a/core/modules/search/migration_templates/d7_search_settings.yml b/core/modules/search/migration_templates/d7_search_settings.yml index 57db8b9..b6c73f6 100644 --- a/core/modules/search/migration_templates/d7_search_settings.yml +++ b/core/modules/search/migration_templates/d7_search_settings.yml @@ -2,6 +2,7 @@ id: d7_search_settings label: Search configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable constants: diff --git a/core/modules/search/migration_templates/search_page.yml b/core/modules/search/migration_templates/search_page.yml index 8ddc02a..76bf3e1 100644 --- a/core/modules/search/migration_templates/search_page.yml +++ b/core/modules/search/migration_templates/search_page.yml @@ -3,6 +3,7 @@ label: Search page configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/shortcut/migration_templates/d7_shortcut.yml b/core/modules/shortcut/migration_templates/d7_shortcut.yml index dac9354..a597780 100644 --- a/core/modules/shortcut/migration_templates/d7_shortcut.yml +++ b/core/modules/shortcut/migration_templates/d7_shortcut.yml @@ -2,6 +2,7 @@ id: d7_shortcut label: Shortcut links migration_tags: - Drupal 7 +audit_ids: false source: plugin: d7_shortcut constants: diff --git a/core/modules/shortcut/migration_templates/d7_shortcut_set.yml b/core/modules/shortcut/migration_templates/d7_shortcut_set.yml index 784178e..4810c21 100644 --- a/core/modules/shortcut/migration_templates/d7_shortcut_set.yml +++ b/core/modules/shortcut/migration_templates/d7_shortcut_set.yml @@ -2,6 +2,7 @@ id: d7_shortcut_set label: Shortcut sets migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_shortcut_set process: diff --git a/core/modules/shortcut/migration_templates/d7_shortcut_set_users.yml b/core/modules/shortcut/migration_templates/d7_shortcut_set_users.yml index d0eb219..9726732 100644 --- a/core/modules/shortcut/migration_templates/d7_shortcut_set_users.yml +++ b/core/modules/shortcut/migration_templates/d7_shortcut_set_users.yml @@ -2,6 +2,7 @@ id: d7_shortcut_set_users label: Shortcut set user mapping migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_shortcut_set_users process: diff --git a/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml b/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml index c9eedbb..aa97bd0 100644 --- a/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml @@ -2,6 +2,7 @@ id: d6_simpletest_settings label: Simpletest configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml b/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml index b77f76a..ba7bc51 100644 --- a/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml @@ -2,6 +2,7 @@ id: d7_simpletest_settings label: SimpleTest configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/statistics/migration_templates/statistics_settings.yml b/core/modules/statistics/migration_templates/statistics_settings.yml index 1f5b5bb..620131c 100644 --- a/core/modules/statistics/migration_templates/statistics_settings.yml +++ b/core/modules/statistics/migration_templates/statistics_settings.yml @@ -3,6 +3,7 @@ label: Statistics configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/syslog/migration_templates/d6_syslog_settings.yml b/core/modules/syslog/migration_templates/d6_syslog_settings.yml index 86a7017..1b67f86 100644 --- a/core/modules/syslog/migration_templates/d6_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d6_syslog_settings.yml @@ -2,6 +2,7 @@ id: d6_syslog_settings label: System log configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/syslog/migration_templates/d7_syslog_settings.yml b/core/modules/syslog/migration_templates/d7_syslog_settings.yml index 4000572..8a4f554 100644 --- a/core/modules/syslog/migration_templates/d7_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d7_syslog_settings.yml @@ -2,6 +2,7 @@ id: d7_syslog_settings label: Syslog configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d6_date_formats.yml b/core/modules/system/migration_templates/d6_date_formats.yml index 71257d4..fe1b96e 100644 --- a/core/modules/system/migration_templates/d6_date_formats.yml +++ b/core/modules/system/migration_templates/d6_date_formats.yml @@ -2,6 +2,7 @@ id: d6_date_formats label: Date format configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable_multirow variables: diff --git a/core/modules/system/migration_templates/d6_menu.yml b/core/modules/system/migration_templates/d6_menu.yml index 25ad0af..0e102af 100644 --- a/core/modules/system/migration_templates/d6_menu.yml +++ b/core/modules/system/migration_templates/d6_menu.yml @@ -3,6 +3,7 @@ id: d6_menu label: Menus migration_tags: - Drupal 6 +audit_ids: true source: plugin: menu process: diff --git a/core/modules/system/migration_templates/d6_system_cron.yml b/core/modules/system/migration_templates/d6_system_cron.yml index 7dd3a2b..bf308e4 100644 --- a/core/modules/system/migration_templates/d6_system_cron.yml +++ b/core/modules/system/migration_templates/d6_system_cron.yml @@ -2,6 +2,7 @@ id: d6_system_cron label: Cron settings migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d6_system_date.yml b/core/modules/system/migration_templates/d6_system_date.yml index 25f6728..b0696ea 100644 --- a/core/modules/system/migration_templates/d6_system_date.yml +++ b/core/modules/system/migration_templates/d6_system_date.yml @@ -2,6 +2,7 @@ id: d6_system_date label: System date configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d6_system_file.yml b/core/modules/system/migration_templates/d6_system_file.yml index 60cd616..0a3a0a5 100644 --- a/core/modules/system/migration_templates/d6_system_file.yml +++ b/core/modules/system/migration_templates/d6_system_file.yml @@ -2,6 +2,7 @@ id: d6_system_file label: File system configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d6_system_performance.yml b/core/modules/system/migration_templates/d6_system_performance.yml index 70a03d6..23b51db 100644 --- a/core/modules/system/migration_templates/d6_system_performance.yml +++ b/core/modules/system/migration_templates/d6_system_performance.yml @@ -2,6 +2,7 @@ id: d6_system_performance label: Performance configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_global_theme_settings.yml b/core/modules/system/migration_templates/d7_global_theme_settings.yml index 42c5177..8e0869a 100644 --- a/core/modules/system/migration_templates/d7_global_theme_settings.yml +++ b/core/modules/system/migration_templates/d7_global_theme_settings.yml @@ -2,6 +2,7 @@ id: d7_global_theme_settings label: D7 global theme settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_menu.yml b/core/modules/system/migration_templates/d7_menu.yml index da47b36..c3c9830 100644 --- a/core/modules/system/migration_templates/d7_menu.yml +++ b/core/modules/system/migration_templates/d7_menu.yml @@ -2,6 +2,7 @@ id: d7_menu label: Menus migration_tags: - Drupal 7 +audit_ids: true source: plugin: menu process: diff --git a/core/modules/system/migration_templates/d7_system_authorize.yml b/core/modules/system/migration_templates/d7_system_authorize.yml index 420497b..b783d0a 100644 --- a/core/modules/system/migration_templates/d7_system_authorize.yml +++ b/core/modules/system/migration_templates/d7_system_authorize.yml @@ -1,6 +1,7 @@ id: d7_system_authorize migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_system_cron.yml b/core/modules/system/migration_templates/d7_system_cron.yml index a603af3..11551e4 100644 --- a/core/modules/system/migration_templates/d7_system_cron.yml +++ b/core/modules/system/migration_templates/d7_system_cron.yml @@ -2,6 +2,7 @@ id: d7_system_cron label: Drupal 7 cron settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_system_date.yml b/core/modules/system/migration_templates/d7_system_date.yml index b380c89..0ea795d 100644 --- a/core/modules/system/migration_templates/d7_system_date.yml +++ b/core/modules/system/migration_templates/d7_system_date.yml @@ -1,6 +1,7 @@ id: d7_system_date migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_system_file.yml b/core/modules/system/migration_templates/d7_system_file.yml index 2295e0e..163378d 100644 --- a/core/modules/system/migration_templates/d7_system_file.yml +++ b/core/modules/system/migration_templates/d7_system_file.yml @@ -2,6 +2,7 @@ id: d7_system_file label: Drupal 7 file system configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_system_mail.yml b/core/modules/system/migration_templates/d7_system_mail.yml index d4a569c..6aa4057 100644 --- a/core/modules/system/migration_templates/d7_system_mail.yml +++ b/core/modules/system/migration_templates/d7_system_mail.yml @@ -1,6 +1,7 @@ id: d7_system_mail migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_system_performance.yml b/core/modules/system/migration_templates/d7_system_performance.yml index abeb008..51a93bf 100644 --- a/core/modules/system/migration_templates/d7_system_performance.yml +++ b/core/modules/system/migration_templates/d7_system_performance.yml @@ -2,6 +2,7 @@ id: d7_system_performance label: Drupal 7 performance configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/d7_theme_settings.yml b/core/modules/system/migration_templates/d7_theme_settings.yml index 09f5fe1..cb3094b 100644 --- a/core/modules/system/migration_templates/d7_theme_settings.yml +++ b/core/modules/system/migration_templates/d7_theme_settings.yml @@ -2,6 +2,7 @@ id: d7_theme_settings label: D7 theme settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_theme_settings constants: diff --git a/core/modules/system/migration_templates/system_image.yml b/core/modules/system/migration_templates/system_image.yml index 7bb16b1..a1185d9 100644 --- a/core/modules/system/migration_templates/system_image.yml +++ b/core/modules/system/migration_templates/system_image.yml @@ -3,6 +3,7 @@ label: Image toolkit configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/system_image_gd.yml b/core/modules/system/migration_templates/system_image_gd.yml index 685116e..0259600 100644 --- a/core/modules/system/migration_templates/system_image_gd.yml +++ b/core/modules/system/migration_templates/system_image_gd.yml @@ -3,6 +3,7 @@ label: Image quality configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/system_logging.yml b/core/modules/system/migration_templates/system_logging.yml index c1e8114..795fca1 100644 --- a/core/modules/system/migration_templates/system_logging.yml +++ b/core/modules/system/migration_templates/system_logging.yml @@ -3,6 +3,7 @@ label: System logging migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/system_maintenance.yml b/core/modules/system/migration_templates/system_maintenance.yml index b9f6c34..16a8cc5 100644 --- a/core/modules/system/migration_templates/system_maintenance.yml +++ b/core/modules/system/migration_templates/system_maintenance.yml @@ -3,6 +3,7 @@ label: Maintenance page configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/system_rss.yml b/core/modules/system/migration_templates/system_rss.yml index 92ce45a..afe4fef 100644 --- a/core/modules/system/migration_templates/system_rss.yml +++ b/core/modules/system/migration_templates/system_rss.yml @@ -3,6 +3,7 @@ label: RSS configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/system/migration_templates/system_site.yml b/core/modules/system/migration_templates/system_site.yml index c8fd849..de582b2 100644 --- a/core/modules/system/migration_templates/system_site.yml +++ b/core/modules/system/migration_templates/system_site.yml @@ -3,6 +3,7 @@ label: Site configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable constants: diff --git a/core/modules/taxonomy/migration_templates/d6_taxonomy_term.yml b/core/modules/taxonomy/migration_templates/d6_taxonomy_term.yml index e3c3e3d..7ed88a7 100644 --- a/core/modules/taxonomy/migration_templates/d6_taxonomy_term.yml +++ b/core/modules/taxonomy/migration_templates/d6_taxonomy_term.yml @@ -2,6 +2,7 @@ id: d6_taxonomy_term label: Taxonomy terms migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_term process: diff --git a/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml index 11af8cd..473ab23 100644 --- a/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml +++ b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml @@ -2,6 +2,7 @@ id: d6_taxonomy_term_translation label: Taxonomy terms migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_term translations: true diff --git a/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary.yml b/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary.yml index 932f9b3..6682253 100644 --- a/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary.yml +++ b/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary.yml @@ -2,6 +2,7 @@ id: d6_taxonomy_vocabulary label: Taxonomy vocabularies migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary process: diff --git a/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary_translation.yml b/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary_translation.yml index dbb1793..2d143d0 100644 --- a/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary_translation.yml +++ b/core/modules/taxonomy/migration_templates/d6_taxonomy_vocabulary_translation.yml @@ -2,6 +2,7 @@ id: d6_taxonomy_vocabulary_translation label: Taxonomy vocabularies migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary_translation process: diff --git a/core/modules/taxonomy/migration_templates/d6_term_node.yml b/core/modules/taxonomy/migration_templates/d6_term_node.yml index 846334d..bda7d58 100644 --- a/core/modules/taxonomy/migration_templates/d6_term_node.yml +++ b/core/modules/taxonomy/migration_templates/d6_term_node.yml @@ -3,6 +3,7 @@ label: Term/node relationships migration_tags: - Drupal 6 deriver: Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver +audit_ids: true source: plugin: d6_term_node process: diff --git a/core/modules/taxonomy/migration_templates/d6_term_node_revision.yml b/core/modules/taxonomy/migration_templates/d6_term_node_revision.yml index 91c8362..24da88f 100644 --- a/core/modules/taxonomy/migration_templates/d6_term_node_revision.yml +++ b/core/modules/taxonomy/migration_templates/d6_term_node_revision.yml @@ -3,6 +3,7 @@ label: Term/node relationship revisions migration_tags: - Drupal 6 deriver: Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver +audit_ids: true source: plugin: d6_term_node_revision process: diff --git a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_display.yml b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_display.yml index 8f154c3..30cd1ae 100644 --- a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_display.yml +++ b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_display.yml @@ -2,6 +2,7 @@ id: d6_vocabulary_entity_display label: Vocabulary display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary_per_type constants: diff --git a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml index 4ac6d64..6ec03b9 100644 --- a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml +++ b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml @@ -2,6 +2,7 @@ id: d6_vocabulary_entity_form_display label: Vocabulary form display configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary_per_type constants: diff --git a/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml b/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml index 082386f..9cd1fdf 100644 --- a/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml +++ b/core/modules/taxonomy/migration_templates/d6_vocabulary_field.yml @@ -2,6 +2,7 @@ id: d6_vocabulary_field label: Vocabulary field configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary constants: diff --git a/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml b/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml index 6fe5eed..3421478 100644 --- a/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml +++ b/core/modules/taxonomy/migration_templates/d6_vocabulary_field_instance.yml @@ -2,6 +2,7 @@ id: d6_vocabulary_field_instance label: Vocabulary field instance configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_taxonomy_vocabulary_per_type constants: diff --git a/core/modules/taxonomy/migration_templates/d7_taxonomy_term.yml b/core/modules/taxonomy/migration_templates/d7_taxonomy_term.yml index 99004df..e518ead 100644 --- a/core/modules/taxonomy/migration_templates/d7_taxonomy_term.yml +++ b/core/modules/taxonomy/migration_templates/d7_taxonomy_term.yml @@ -3,6 +3,7 @@ label: Taxonomy terms migration_tags: - Drupal 7 deriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver +audit_ids: true source: plugin: d7_taxonomy_term process: diff --git a/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml b/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml index 355a69c..496e1f6 100644 --- a/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml +++ b/core/modules/taxonomy/migration_templates/d7_taxonomy_vocabulary.yml @@ -2,6 +2,7 @@ id: d7_taxonomy_vocabulary label: Taxonomy vocabularies migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_taxonomy_vocabulary process: diff --git a/core/modules/taxonomy/migration_templates/taxonomy_settings.yml b/core/modules/taxonomy/migration_templates/taxonomy_settings.yml index c20372c..a9e2474 100644 --- a/core/modules/taxonomy/migration_templates/taxonomy_settings.yml +++ b/core/modules/taxonomy/migration_templates/taxonomy_settings.yml @@ -3,6 +3,7 @@ label: Taxonomy configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/text/migration_templates/text_settings.yml b/core/modules/text/migration_templates/text_settings.yml index 45d426d..1db61e7 100644 --- a/core/modules/text/migration_templates/text_settings.yml +++ b/core/modules/text/migration_templates/text_settings.yml @@ -3,6 +3,7 @@ label: Drupal teaser length configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/tracker/migration_templates/d7_tracker_node.yml b/core/modules/tracker/migration_templates/d7_tracker_node.yml index 02645d7..2bf3b07 100644 --- a/core/modules/tracker/migration_templates/d7_tracker_node.yml +++ b/core/modules/tracker/migration_templates/d7_tracker_node.yml @@ -2,6 +2,7 @@ id: d7_tracker_node label: Tracker node migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_tracker_node process: diff --git a/core/modules/tracker/migration_templates/d7_tracker_settings.yml b/core/modules/tracker/migration_templates/d7_tracker_settings.yml index ce06cbd..7e14748 100644 --- a/core/modules/tracker/migration_templates/d7_tracker_settings.yml +++ b/core/modules/tracker/migration_templates/d7_tracker_settings.yml @@ -2,6 +2,7 @@ id: d7_tracker_settings label: Tracker settings migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/tracker/migration_templates/d7_tracker_user.yml b/core/modules/tracker/migration_templates/d7_tracker_user.yml index ae3c51d..776e1c7 100644 --- a/core/modules/tracker/migration_templates/d7_tracker_user.yml +++ b/core/modules/tracker/migration_templates/d7_tracker_user.yml @@ -2,6 +2,7 @@ id: d7_tracker_user label: Tracker user migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_tracker_user process: diff --git a/core/modules/update/migration_templates/update_settings.yml b/core/modules/update/migration_templates/update_settings.yml index ad22472..111f0ce 100644 --- a/core/modules/update/migration_templates/update_settings.yml +++ b/core/modules/update/migration_templates/update_settings.yml @@ -3,6 +3,7 @@ label: Update configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/user/migration_templates/d6_profile_values.yml b/core/modules/user/migration_templates/d6_profile_values.yml index 5530ca5..8b0d4b0 100644 --- a/core/modules/user/migration_templates/d6_profile_values.yml +++ b/core/modules/user/migration_templates/d6_profile_values.yml @@ -3,6 +3,7 @@ label: Profile values class: Drupal\user\Plugin\migrate\ProfileValues migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_profile_field_values process: diff --git a/core/modules/user/migration_templates/d6_user.yml b/core/modules/user/migration_templates/d6_user.yml index d58607b..034ce22 100644 --- a/core/modules/user/migration_templates/d6_user.yml +++ b/core/modules/user/migration_templates/d6_user.yml @@ -2,6 +2,7 @@ id: d6_user label: User accounts migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_user process: diff --git a/core/modules/user/migration_templates/d6_user_contact_settings.yml b/core/modules/user/migration_templates/d6_user_contact_settings.yml index 0d9a228..3fc3c3f 100644 --- a/core/modules/user/migration_templates/d6_user_contact_settings.yml +++ b/core/modules/user/migration_templates/d6_user_contact_settings.yml @@ -2,6 +2,7 @@ id: d6_user_contact_settings label: User contact settings migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_user constants: diff --git a/core/modules/user/migration_templates/d6_user_mail.yml b/core/modules/user/migration_templates/d6_user_mail.yml index b06b6ea..0c33f0f 100644 --- a/core/modules/user/migration_templates/d6_user_mail.yml +++ b/core/modules/user/migration_templates/d6_user_mail.yml @@ -2,6 +2,7 @@ id: d6_user_mail label: User mail configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/user/migration_templates/d6_user_picture_file.yml b/core/modules/user/migration_templates/d6_user_picture_file.yml index 3518d7a..93a6e5e 100644 --- a/core/modules/user/migration_templates/d6_user_picture_file.yml +++ b/core/modules/user/migration_templates/d6_user_picture_file.yml @@ -2,6 +2,7 @@ id: d6_user_picture_file label: User pictures migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_user_picture_file constants: diff --git a/core/modules/user/migration_templates/d6_user_role.yml b/core/modules/user/migration_templates/d6_user_role.yml index 1d224f4..6ec78ff 100644 --- a/core/modules/user/migration_templates/d6_user_role.yml +++ b/core/modules/user/migration_templates/d6_user_role.yml @@ -2,6 +2,7 @@ id: d6_user_role label: User roles migration_tags: - Drupal 6 +audit_ids: true source: plugin: d6_user_role process: diff --git a/core/modules/user/migration_templates/d6_user_settings.yml b/core/modules/user/migration_templates/d6_user_settings.yml index 6e25ece..a03b46b 100644 --- a/core/modules/user/migration_templates/d6_user_settings.yml +++ b/core/modules/user/migration_templates/d6_user_settings.yml @@ -2,6 +2,7 @@ id: d6_user_settings label: User configuration migration_tags: - Drupal 6 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/user/migration_templates/d7_user.yml b/core/modules/user/migration_templates/d7_user.yml index ae52384..9babed3 100644 --- a/core/modules/user/migration_templates/d7_user.yml +++ b/core/modules/user/migration_templates/d7_user.yml @@ -3,6 +3,7 @@ label: User accounts migration_tags: - Drupal 7 class: Drupal\user\Plugin\migrate\User +audit_ids: true source: plugin: d7_user process: diff --git a/core/modules/user/migration_templates/d7_user_flood.yml b/core/modules/user/migration_templates/d7_user_flood.yml index ae00ce0..036a049 100644 --- a/core/modules/user/migration_templates/d7_user_flood.yml +++ b/core/modules/user/migration_templates/d7_user_flood.yml @@ -2,6 +2,7 @@ id: d7_user_flood label: User flood configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/user/migration_templates/d7_user_mail.yml b/core/modules/user/migration_templates/d7_user_mail.yml index 0c5e74c..53037e8 100644 --- a/core/modules/user/migration_templates/d7_user_mail.yml +++ b/core/modules/user/migration_templates/d7_user_mail.yml @@ -2,6 +2,7 @@ id: d7_user_mail label: User mail configuration migration_tags: - Drupal 7 +audit_ids: true source: plugin: variable variables: diff --git a/core/modules/user/migration_templates/d7_user_role.yml b/core/modules/user/migration_templates/d7_user_role.yml index 5f88757..cfcf237 100644 --- a/core/modules/user/migration_templates/d7_user_role.yml +++ b/core/modules/user/migration_templates/d7_user_role.yml @@ -2,6 +2,7 @@ id: d7_user_role label: User roles migration_tags: - Drupal 7 +audit_ids: true source: plugin: d7_user_role process: diff --git a/core/modules/user/migration_templates/user_picture_entity_display.yml b/core/modules/user/migration_templates/user_picture_entity_display.yml index 3f404d6..129c4d9 100644 --- a/core/modules/user/migration_templates/user_picture_entity_display.yml +++ b/core/modules/user/migration_templates/user_picture_entity_display.yml @@ -3,6 +3,7 @@ label: User picture display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: user_picture_instance constants: diff --git a/core/modules/user/migration_templates/user_picture_entity_form_display.yml b/core/modules/user/migration_templates/user_picture_entity_form_display.yml index 4d0f8bc..50a583d 100644 --- a/core/modules/user/migration_templates/user_picture_entity_form_display.yml +++ b/core/modules/user/migration_templates/user_picture_entity_form_display.yml @@ -3,6 +3,7 @@ label: User picture form display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: user_picture_instance constants: diff --git a/core/modules/user/migration_templates/user_picture_field.yml b/core/modules/user/migration_templates/user_picture_field.yml index ff8bd82..94ba592 100644 --- a/core/modules/user/migration_templates/user_picture_field.yml +++ b/core/modules/user/migration_templates/user_picture_field.yml @@ -3,6 +3,7 @@ label: User picture field configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: # We do an empty source and a proper destination to have an idmap for # dependencies. diff --git a/core/modules/user/migration_templates/user_picture_field_instance.yml b/core/modules/user/migration_templates/user_picture_field_instance.yml index 4332e09..1038f58 100644 --- a/core/modules/user/migration_templates/user_picture_field_instance.yml +++ b/core/modules/user/migration_templates/user_picture_field_instance.yml @@ -3,6 +3,7 @@ label: User picture field instance configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: user_picture_instance constants: diff --git a/core/modules/user/migration_templates/user_profile_entity_display.yml b/core/modules/user/migration_templates/user_profile_entity_display.yml index f4353dd..d8b8e12 100644 --- a/core/modules/user/migration_templates/user_profile_entity_display.yml +++ b/core/modules/user/migration_templates/user_profile_entity_display.yml @@ -3,6 +3,7 @@ label: User profile display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: profile_field constants: diff --git a/core/modules/user/migration_templates/user_profile_entity_form_display.yml b/core/modules/user/migration_templates/user_profile_entity_form_display.yml index cfabd76..377b59c 100644 --- a/core/modules/user/migration_templates/user_profile_entity_form_display.yml +++ b/core/modules/user/migration_templates/user_profile_entity_form_display.yml @@ -3,6 +3,7 @@ label: User profile form display configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: profile_field constants: diff --git a/core/modules/user/migration_templates/user_profile_field.yml b/core/modules/user/migration_templates/user_profile_field.yml index 3ba0eee..d560c9f 100644 --- a/core/modules/user/migration_templates/user_profile_field.yml +++ b/core/modules/user/migration_templates/user_profile_field.yml @@ -3,6 +3,7 @@ label: User profile field configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: profile_field constants: diff --git a/core/modules/user/migration_templates/user_profile_field_instance.yml b/core/modules/user/migration_templates/user_profile_field_instance.yml index b9f213b..db96701 100644 --- a/core/modules/user/migration_templates/user_profile_field_instance.yml +++ b/core/modules/user/migration_templates/user_profile_field_instance.yml @@ -3,6 +3,7 @@ label: User profile field instance configuration migration_tags: - Drupal 6 - Drupal 7 +audit_ids: true source: plugin: profile_field constants: diff --git a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php index 7c2c81a..f0206e5 100644 --- a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php +++ b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php @@ -127,4 +127,18 @@ protected function processStubRow(Row $row) { } } + /** + * {@inheritdoc} + */ + protected function highestDestinationId() { + $found = parent::highestDestinationId(); + + // Every Drupal site must have at least a single non-anonymous user, and + // it's normal for upgrade migrations to overwrite this user. + if ($found == 1) { + return 0; + } + return $found; + } + }