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.
modules/system/system.install:2079: update_variables_to_config('system.mail'
Thanks in advance for helping many hands to make light work!
See #2181257: [meta] Variables to config migration [d7] for instructions
Comment | File | Size | Author |
---|---|---|---|
#19 | 2130609-19.patch | 3.11 KB | javisr |
Comments
Comment #1
fastangel CreditAttribution: fastangel commentedworking on this.
Comment #2
fastangel CreditAttribution: fastangel commentedThe system mail was introduced in D7. The variable in D8
Should be mapped with mail_system (D7). For more clarification see https://api.drupal.org/api/drupal/includes!mail.inc/function/drupal_mail...
In D6 this hability only is possible with contrib modules.
chx better the explanation now? ;)
Comment #3
eliza411 CreditAttribution: eliza411 commentedMoving to the core queue to consolidate issues now that we're doing all the work there.
Comment #4
eliza411 CreditAttribution: eliza411 commentedComment #5
David Hernández CreditAttribution: David Hernández commentedHi there,
Here is my first try to work on the migrate project. I'm not sure if I've done it correctly. I followed the steps of a d6 patch of this kind. I'm also not sure about creating a copy of Drupal6DumpCommon for Drupal 7 as it's exactly the same code. Can someone point me if I'm going in the right direction?
Regards,
David.
Comment #6
chx CreditAttribution: chx commentedThanks for this. There is no need for a Drupal7DumpCommon.php and also your source plugin is drupal6_variable not drupal7_variable ; we won't write a separate drupal7 plugin when the variable table didn't change.
Comment #7
eliza411 CreditAttribution: eliza411 commentedI tried to update all these issues to point to some D7 specific instructions, but I missed this one, so I'm updating now.
I'll be editing those to make it more clear that we're re-using the drupal6_variable plugin (which the script should accurately be leaving in place.)
Comment #8
eliza411 CreditAttribution: eliza411 commentedSetting this to needs work for the recommended adjustments, too.
Comment #9
eliza411 CreditAttribution: eliza411 commentedI tried my hand at making the changes chx suggested. tests pass, but with 9 exceptions:
Drupal\Core\Database\SchemaObjectExistsException: Table variable already exists. in Drupal\Core\Database\Schema->createTable() (line 678 of /var/www/imp/drupal-imp/core/lib/Drupal/Core/Database/Schema.php).
Comment #10
eliza411 CreditAttribution: eliza411 commentedThere was more feedback in irc, below. I've made the first change, but I am unsure about the second and I'm out of time. I'm posting the one change. I hope to use this as an example for the other [d7] variable to config migrations so I'm eager to get it right but also out of my depth.
eliza411: $executable = new MigrateExecutable($migration, new MigrateMessage()); we now use
eliza411: $executable = new MigrateExecutable($migration, $this);
it's not a make-or-break change but the error reporting is much better
eliza411: also, the patch refers to Drupal7SystemMail.php but that's not added to it
Comment #11
eliza411 CreditAttribution: eliza411 commentedMissed a change I had in the earlier patch.
Comment #12
David Hernández CreditAttribution: David Hernández commentedComment #13
samhassell CreditAttribution: samhassell commentedComment #14
David Hernández CreditAttribution: David Hernández commented@samhassell, still working on this?
Comment #15
javisr CreditAttribution: javisr commentedI'm working on this issue
Comment #16
javisr CreditAttribution: javisr commentedComment #17
javisr CreditAttribution: javisr commentedRe-rolled :)
Comment #18
David Hernández CreditAttribution: David Hernández commentedDrupal7SystemMail needs an empty line at the end of the file.
A part of that, everything looks fine. The tests are passing.
Comment #19
javisr CreditAttribution: javisr commentedAdded the empty line at the end of the file
Comment #20
michaellenahan CreditAttribution: michaellenahan commentedPatch applied cleanly. Tests run correctly.
I did manual testing of the migration.
On my D7 system I installed mailsystem.
On:
http://imp7.local/admin/config/system/mailsystem
I saved the form, so that there was a variable in the variables table.
On the D8 imp system I'm in the drupal7 branch.
First step to actually run the migration with drush is to create a manifest.yml file.
manifest.yml contains one line (the id of the migration we want to run):
In D8 imp make sure that drupal_migrate module is enabled.
(If you have no luck doing this with drush, you may need to do it via the user interface at admin/modules.)
Now you can run the migration.
And to confirm that the value from D7 has been migrated to D8, you can run "drush cget" (see "drush help cget" for the syntax).
Now geek out by going to the D7 site:
http://imp7.local/admin/config/system/mailsystem
Change the "Site-wide default MailSystemInterface class"
Save the form in D7.
Now on your command line for your D8 imp site:
Confirm that the configuration entity in D8 has now been updated.
And rejoice in the fact that you have a working migration :)
Comment #21
jcost CreditAttribution: jcost commentedWill need to be submitted again to Core since moving from sandbox.
Comment #22
phenaproximaNeeds to be merged into the parent issue.
Comment #23
phenaproximaMerged with the parent issue.