Declare upgrade status from D6, D7

Created on 28 December 2022, over 2 years ago
Updated 16 December 2024, 4 months ago

Problem/Motivation

As of 2022-12-27 / google_analytics-4.0.2 ( there are a bunch of migrate issues! ), I can confirm that this module properly migrates my Google Analytics module data from Drupal 7 to Drupal 9. Thank you very much for your hard work to make this easy for me!

But as of Drupal core 8.8.x, modules can declare their Drupal 8 (or 9) upgrade status ( changelog , issue #2936365: Migrate UI - allow modules to declare the state of their migrations ). Failing to do so makes it seem as if this module has no migrations and/or is not ready to be upgraded... for example, see the following image...

... this could be a barrier preventing other people from upgrading their sites to Drupal 8/9/10+.

Steps to reproduce

  1. Set up a Drupal 7 site. Download and install google_analytics-7.x-2.6, and change some settings.
  2. Set up a Drupal 9 site with the Standard install profile. Download and install google_analytics-4.0.2. Enable core's migrate, migrate_drupal, and migrate_drupal_ui modules.
  3. As an administrator, visit /upgrade to begin the Drupal-to-Drupal migration. Proceed through the wizard to the "What will be upgraded?" step.
    • Expected behaviour: "Google Analytics" is in the "Modules that will be upgraded" section.
    • Actual behaviour: "Google Analytics" is in the "Modules that will not be upgraded" section.
  4. Click "Perform upgrade" and wait for the upgrade to finish.
  5. Check the Google Analytics settings at /admin/config/services/google-analytics - note the custom settings were migrated from D7 so the migration is working.

Proposed resolution

Declare the finished upgrade path from D6 and D7 by creating a migrations/state/google_analytics.migrate_drupal.yml and populating it appropriately.

Remaining tasks

  1. Review and feedback
  2. RTBC and feedback
  3. Commit
  4. Release

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

🇨🇦Canada mparker17 UTC-4

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada mparker17 UTC-4

    While this patch only declares that the upgrade status is finished, and doesn't affect what actually gets migrated, I am happy to report that I was able to upgrade my Google Analytics configuration from my drupal-7.99 site running google_analytics-7.x-2.8 to a drupal-10.2.1 site running google_analytics-4.0.2 using the migration code already in the D10 version of the module.

    I cannot RTBC this issue because I wrote the patch . But, hopefully, my success will help other people migrating D7 to D10.

    However, now that my D7 to D10 site migration is complete, my ability to contribute further to this issue is severely limited, because the D7 site that I had been using to test has been retired. But, I'll keep an eye on this issue and try to answer questions to the best of my ability.

  • First commit to issue fork.
  • 🇺🇸United States japerry KVUO

    Looks like some pieces are missing from the migration

Production build 0.71.5 2024