Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

This patch makes Migrate Drupal UI show the accurate current status: it is recommended to install the D8 branch of Comment Notify when updating from D7. But none of the settings are currently being migrated. At least it shows up correctly :)

Wim Leers’s picture

It'd be valuable to have existing comment notification subscriptions continue to work. Marking NW for that.

The similar D6 → D7 migration path at #2231147: Support migration for comment notify user settings has been ready and uncommitted for years, which is unfortunate. But maybe it can still serve as an inspiration for the D7 → D8 case :)

  • gnuget committed 6c160de on 8.x-1.x authored by Wim Leers
    Issue #3095510 by Wim Leers: Drupal 7 → Drupal 8 migration path
    
gnuget’s picture

Status: Needs review » Needs work

I commited your patch.

And I'm going to switch this to Needs work.

Thanks!

davidhk’s picture

Here are the files I'm using to migrate comment notify user settings from D7 to D9 for our site, in case they can help anyone else. (The site is called Gwulo, and my custom module is called gwulo_migrate, so you'll need to change it to your own module name.)

The php file (delete the _.txt extension) is in directory \web\modules\contrib\gwulo_migrate\src\Plugin\migrate\source and makes the values in the D7 comment_notify_user_setting table available to migrations. Then Drupal's existing migration plugins can handle the rest.

One row in the comment_notify_user_setting table holds two fields, comment_notify and node_notify. They must be stored as two separate rows in the D9 users_data table, so I run the two attached migrations, one migrating all the comment_notify values across, and the second migrating all the node_notify values across. The two yml files are in directory \web\modules\contrib\gwulo_migrate\migrations