Commit 3917a3f8 authored by catch's avatar catch

Issue #3096676 by quietone, Wim Leers, mikelutz, heddn, gabesullice, alexpott:...

Issue #3096676 by quietone, Wim Leers, mikelutz, heddn, gabesullice, alexpott: system_maintenance migrations uses incorrect maintenance mode variable in Drupal 7 migrations

(cherry picked from commit c494a61e)
parent 40af1480
......@@ -58608,10 +58608,6 @@
'name' => 'site_name',
'value' => 's:13:"The Site Name";',
))
->values(array(
'name' => 'site_offline_message',
'value' => 's:42:"This is a custom maintenance mode message.";',
))
->values(array(
'name' => 'site_slogan',
'value' => 's:10:"The Slogan";',
......@@ -7,10 +7,20 @@ migration_tags:
source:
plugin: variable
variables:
- maintenance_mode_message
- site_offline_message
source_module: system
process:
message: site_offline_message
message:
-
plugin: callback
callable: array_filter
source:
- maintenance_mode_message
- site_offline_message
-
plugin: callback
callable: current
destination:
plugin: config
config_name: system.maintenance
......@@ -128,6 +128,18 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
protected function setUp(): void {
parent::setUp();
// The system_maintenance migration gets both the Drupal 6 and Drupal 7
// site maintenance message. Add a row with the Drupal 6 version of the
// maintenance message to confirm that the Drupal 7 variable is selected in
// the migration.
// See https://www.drupal.org/project/drupal/issues/3096676
$this->sourceDatabase->insert('variable')
->fields([
'name' => 'site_offline_message',
'value' => 's:16:"Drupal 6 message";',
])
->execute();
$migrations = [
'd7_system_authorize',
'd7_system_cron',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment