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.
Comment | File | Size | Author |
---|---|---|---|
#6 | migrate_plus.migration.gwulo_upgrade_d7_user_node_notify.yml | 1.75 KB | davidhk |
#6 | migrate_plus.migration.gwulo_upgrade_d7_user_comment_notify.yml | 1.74 KB | davidhk |
#6 | GwuloD7UserCommentNotify.php_.txt | 1.94 KB | davidhk |
#2 | Screenshot 2019-11-20 at 00.06.09.png | 147.81 KB | Wim Leers |
#2 | 3095510-2.patch | 399 bytes | Wim Leers |
Comments
Comment #2
Wim LeersThis 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 :)
Comment #3
Wim LeersIt'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 :)
Comment #5
gnugetI commited your patch.
And I'm going to switch this to Needs work.
Thanks!
Comment #6
davidhk CreditAttribution: davidhk commentedHere 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