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
Contact Save module was written ages ago for Drupal 6 and Drupal 7. It would be nice to be able to have a migration path from contact save to contact storage for at least the contact form storage. Contact Save has more functionality than Contact Storage such as the reply functionality, and so it may be a good idea to merge efforts and reduce project duplication.
Proposed resolution
Add a migration plugin for the contact_save schema to the contact entity storage.
Remaining tasks
- Review feature request
Comment | File | Size | Author |
---|---|---|---|
#21 | interdiff.txt | 562 bytes | mradcliffe |
#21 | contact_storage-2500651-contact_save-migration-21.patch | 13.2 KB | mradcliffe |
#19 | interdiff.txt | 498 bytes | mradcliffe |
#19 | contact_storage-2500651-contact_save-migration-19.patch | 13.15 KB | mradcliffe |
#17 | interdiff.txt | 725 bytes | mradcliffe |
Comments
Comment #1
andypostNice idea
Comment #2
sidharthapI am working on it.
Comment #3
sidharthapComment #4
mradcliffeHere is a work-in-progress patch. I have not been able to start testing and debugging what else needs to be done because even though migration template is in config it's not being picked up by migrate-upgrade --configure-only.
Comment #5
mradcliffeThis patch successfully migrates data one time. It looks like it migrates in dupes if run each consecutive time.
This interdiff looks a bit weird but that's what interdiff output. :|
todo:
1. Recipients process plugin
2. Add created date to migration
3. UID migration
for discussion:
- should this also migrate and create fields for reply, replied, replier, and uid?
Comment #6
mradcliffeAlso, switching from SourcePluginBase to SqlBase caused a dependency on adding 'migrate' key into databases in settings.php. I'm not sure why.
Comment #7
mradcliffeThis should be feature complete for Drupal 6 migration of contact_save with the addition of created and recipient migration.
If another module has changed the cardinality of the recipient field to multiple values, then this migration will support that. However, if not, then it will just use one recipient.
Re-rolled patch based on git pull.
Edit: any additional features could be added by another module or for Drupal 7 contact_save.
Comment #8
andypost@mradcliffe Thanx, code looks good!
If we wanna to make storage into 8.2 we need test coverage for each module's features
Comment #9
mradcliffeMigrate tests are not my strength so let's see how much this patch fails.
Edit: this is just a start of a test.
Comment #11
mradcliffeHmm.. Maybe test_dependencies?
Comment #13
mradcliffeOh, it was removed some time in 8.1.x development but no change record exists for it? :(
Comment #15
mradcliffeFound you sneaky issue #2684141: Convert migrate kernel tests to KernelTestBaseTNG.
Anyway, here's a patch that should at least run in 8.2.x.
Comment #17
mradcliffeAnother try.
Comment #19
mradcliffeFixed namespace
Comment #21
mradcliffeInstall schema before test similar to other kernel test.
Comment #23
jibranThe patch looks good can we please clear out the phpcs issues and fails.