From b948f840f9ef3412efa9aee89e29580b0fb8ccc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=A9na=20Proxima?= Date: Mon, 1 Feb 2021 09:42:30 -0500 Subject: [PATCH] Issue #3153885: Active themes reverts to Claro and Bartik when installing a site from an existing config --- lightning.profile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lightning.profile b/lightning.profile index f523a717c..8a989ab15 100644 --- a/lightning.profile +++ b/lightning.profile @@ -10,15 +10,18 @@ use Drupal\user\RoleInterface; /** * Implements hook_install_tasks(). */ -function lightning_install_tasks() { +function lightning_install_tasks(array &$install_state) { $tasks = []; - $tasks['lightning_set_front_page'] = []; - $tasks['lightning_grant_shortcut_access'] = []; - $tasks['lightning_set_default_theme'] = []; - $tasks['lightning_set_logo'] = []; - $tasks['lightning_alter_frontpage_view'] = []; - + // All of these tasks modify configuration, so don't do any of them if + // we're installing from existing config. + if (empty($install_state['config_install_path'])) { + $tasks['lightning_set_front_page'] = []; + $tasks['lightning_grant_shortcut_access'] = []; + $tasks['lightning_set_default_theme'] = []; + $tasks['lightning_set_logo'] = []; + $tasks['lightning_alter_frontpage_view'] = []; + } return $tasks; }