diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index 7e9893c..a238f4f 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -314,9 +314,14 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = // Process the theme and all its base themes. foreach ($theme_keys as $theme) { // Include the theme-settings.php file. - $filename = DRUPAL_ROOT . '/' . $themes[$theme]->getPath() . '/theme-settings.php'; - if (file_exists($filename)) { - require_once $filename; + $theme_settings_file = drupal_get_path('theme', $theme) . '/theme-settings.php'; + $theme_file = drupal_get_path('theme', $theme) . '/' . $theme . '.theme'; + $filenames = array($theme_setting_file, $theme_file); + foreach ($filenames as $filename) { + if (file_exists($filename)) { + require_once $filename; + $form_state->addBuildInfo('files', array($filename)); + } } // Call theme-specific settings.