Updated: Comment #N

Problem/Motivation

In order to not stall #2167347: It's possible to enable a non-existing theme so people can write sub themes this issue addresses the code rewrites for using the new function.

Proposed resolution

Replace code calling config() directly like found with

$ grep -ri \'admin\' * | grep -i theme

edit/edit.module:    $theme = Drupal::config('system.theme')->get('admin');
shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php:    \Drupal::config('system.theme')->set('admin', 'seven')->save();
system/lib/Drupal/system/Controller/SystemController.php:    $admin_theme = $config->get('admin');
system/lib/Drupal/system/Controller/ThemeController.php:        if ($theme === $this->config->get('default') || $theme === $this->config->get('admin')) {
system/lib/Drupal/system/Form/ThemeAdminForm.php:      '#default_value' => $this->config('system.theme')->get('admin'),
system/lib/Drupal/system/Form/ThemeAdminForm.php:    $this->config('system.theme')->set('admin', $form_state['values']['admin_theme'])->save();
system/lib/Drupal/system/Tests/Batch/PageTest.php:    \Drupal::config('system.theme')->set('admin', 'seven')->save();
system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php:      'theme' => \Drupal::config('system.theme')->get('admin'),
system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php:      ->set('admin', $this->admin_theme)
system/lib/Drupal/system/Tests/System/ThemeTest.php:    $this->drupalGet('admin');
system/system.admin.inc:      $admin_theme = \Drupal::config('system.theme')->get('admin');
system/system.install:    'admin_theme' => 'admin',
system/tests/modules/menu_test/lib/Drupal/menu_test/Theme/TestThemeNegotiator.php:      return \Drupal::config('system.theme')->get('admin');
taxonomy/lib/Drupal/taxonomy/Tests/ThemeTest.php:      ->set('admin', 'seven')
user/lib/Drupal/user/Theme/AdminNegotiator.php:    return $this->configFactory->get('system.theme')->get('admin');

Other scans

$ grep -ir "get('system.theme'" *
$ grep -ri \'default\' * | grep -i theme

Remaining tasks

Find more parts using config() calls for default theme.

User interface changes

API changes

Comments

clemens.tolboom’s picture

Issue summary: View changes

Fixed grep command and added 2 more.

star-szr’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Active » Postponed
Issue tags: -SprintWeekend2014

Bumping, I think this could be worked on in later 8.x.x versions.

joelpittet’s picture

Status: Postponed » Active

Doesn't need to be postponed any longer, can be tackled in 8.1.x as the branches are synced

dawehner’s picture

Yeah taht sounds sensible!

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

catch’s picture

Status: Active » Closed (outdated)
Issue tags: +Bug Smash Initiative

#2176355: Followup: rewrite remaining code to use themehandler get|set|is for default and admin didn't land, we did #1067408: Themes do not have an installation status, but that issue didn't add the set/get/is methods mentioned here, so closing this as outdated.