Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Attempt to migrate a D7.72 site with GA 7.x-2.6 to D9.0.5.
Steps to reproduce
Use the migrate UI, or drush migrate:import d7_google_analytics_settings
Observe error message, on the CLI with Drush or in DbLog with the migrate UI
The "migration" plugin does not exist. Valid plugin IDs for Drupal\migrate\Plugin\MigratePluginManager are: block_plugin_id, block_settings, block_visibility, block_region, block_theme, d7_field_type _defaults, d7_field_option_translation, d7_field_instance_option_translation, d7_field_instance_settings, d7_field_instance_defaults, d7_field_settings, d6_field_type_defaults, d6_field_option_transl ation, d6_field_instance_option_translation, field_formatter_settings_defaults, d6_field_field_settings, field_instance_widget_settings, d6_field_instance_defaults, field_settings, process_field, fie ld_type, d7_field_permission_settings, d6_field_file, file_uri, filter_format_permission, filter_id, filter_settings, google_analytics_visibility_pages, google_analytics_visibility_roles, d6_imagecac he_actions, content_translation_enabled_setting, language_types, language_negotiation, language_domains, field_link, link_uri, urlencode, explode, download, extract, get, file_copy, entity_exists, sk ip_on_empty, menu_link_parent, substr, null_coalesce, static_map, migration_lookup, sub_process, format_date, route, concat, skip_row_if_not_set, log, make_unique_entity_field, flatten, machine_name, default_value, callback, array_build, node_complete_node_translation_lookup, node_complete_node_revision_lookup, node_complete_node_lookup, skip_on_value, default_entity_value, dom_str_replace, sing le_value, dom_migration_lookup, file_blob, str_replace, multiple_values, merge, transliteration, array_shift, entity_lookup, dom, dom_apply_styles, array_pop, entity_generate, node_update_7008, d6_ur l_alias_language, path_set_translated, search_configuration_rankings, timezone, system_update_7000, forum_vocabulary, user_langcode, profile_field_settings, user_update_8002, d6_profile_field_option_ translation, user_update_7002, convert_tokens
Then try a drush ms d7_google_analytics_settings
, and get:
------------------- ------------------------------ ----------- ------- ---------- ------------- --------------- Group Migration ID Status Total Imported Unprocessed Last Imported ------------------- ------------------------------ ----------- ------- ---------- ------------- --------------- Default (default) d7_google_analytics_settings Importing 1 0 1 ------------------- ------------------------------ ----------- ------- ---------- ------------- ---------------
Proposed resolution
Use the current plugin name in GoogleAnalyticsVisibility[Pages|Roles]::transform()
, that is migration_lookup
instead of migration
.
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#15 | d7-to-d9-migration-3170816-15.patch | 4.71 KB | amarlata |
#14 | d7-to-d9-migration-3170816-14.patch | 5 KB | amarlata |
#13 | d7-to-d9-migration-3170816-13.patch | 5.04 KB | amarlata |
#2 | 3170816-migrate_d9.patch | 1.49 KB | fgm |
|
Comments
Comment #2
fgmSuggested patch.
Comment #3
Wim LeersConfirmed! This is a hard stop and breaks the migration completely.
I can confirm this fixes the migration 👍
Comment #4
marc.bau CreditAttribution: marc.bau commentedMatomo module needs the same patch...
Migration is still failing for me with the patch in Drupal 9.1.2!
Comment #5
sim_1+1 to RTBC for this patch! Migrating from 7.72 -> 9.1.2 and this kept the migration from completely stopping.
Comment #6
sjhuskey CreditAttribution: sjhuskey as a volunteer commentedMigrating from 7.81 to 9.2. This kept the migration from failing. Thanks!
Comment #8
japerryConfirmed! Updated in the 4.x branch.
Comment #9
Wim LeersVersion 4 is in the alpha stage. Can you please also commit this to the
8.x-3.x
branch, so that people can migrate into a stable module? 😊🙏Comment #11
japerryMarking patch to be ported because I've committed the patch to 3.x and the 4.x version needs some updates for dimensions and metrics. There is some internal Acquia work to get that issue fixed.
Comment #12
Wim LeersThanks!
Comment #13
amarlataCreated a new patch for dimensions and metrics field migration from D7 to D9.
Comment #14
amarlataCreated a new patch for dimensions and metrics field migration from D7 to D9 and added new file in patch
Comment #15
amarlataUpdated patch with the 4.x branch.
Comment #16
amarlataComment #18
japerry