diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1298,8 +1298,6 @@ } if (empty($cache[$theme])) { - // Set the default values for each global setting. - $config = config('system.theme.global'); // Provide defaults as function is used before config installed. $default_config = array( 'favicon' => array( @@ -1319,11 +1317,10 @@ foreach ($features as $feature) { $default_config['features'][$feature] = 1; } - $default_config = NestedArray::mergeDeep($default_config, $config->get()); // Cache a config object that will merge $default_config, // system.theme configuration and the theme's config. - $cache[$theme] = clone $config; + $cache[$theme] = config('cache.' . $theme); $cache[$theme]->setData($default_config); // Get the values for the theme-specific settings from the .info files of @@ -1341,12 +1338,16 @@ $theme_keys = array($theme); } foreach ($theme_keys as $theme_key) { - // @todo Need to work how to convert this to CMI. if (!empty($themes[$theme_key]->info['settings'])) { $cache[$theme]->setData(NestedArray::mergeDeep($cache[$theme]->get(), $themes[$theme_key]->info['settings'])); } } + } + + // Get the saved global settings from the database. + $cache[$theme]->setData(NestedArray::mergeDeep($cache[$theme]->get(), config('system.theme.global')->get())); + if ($theme) { // Get the saved theme-specific settings from the configuration system. $cache[$theme]->setData(NestedArray::mergeDeep($cache[$theme]->get(), config($theme . '.settings')->get()));