ajax.inc and many other files uses variable_get() / _set() of the setting 'theme_default' and requires change to the new configuration system.

Part of #1775842: [meta] Convert all variables to state and/or config systems

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lirantal’s picture

Assigned: Unassigned » lirantal
lirantal’s picture

Title: Convert ajax settings to configuration system » Convert theme_default setting to configuration system
FileSize
24.58 KB

Patch for changing the theme_default setting across the entire code-base from relying on the variable_get() / variable_set() to the new configuration system.

lirantal’s picture

Status: Active » Needs review

I wasn't sure about the snippet from system.install, whether or not it should be updated too:

/**
 * Move from the Garland theme.
 */
function system_update_8001() {
  $themes = array('theme_default', 'maintenance_theme', 'admin_theme');
  foreach ($themes as $theme) {
    if (update_variable_get($theme) == 'garland') {
      update_variable_set($theme, 'bartik');
    }
  }
}
lirantal’s picture

Component: ajax system » base system

Status: Needs review » Needs work

The last submitted patch, convert_theme_default_var-1876534-2.patch, failed testing.

dawehner’s picture

+++ b/core/includes/ajax.incundefined
@@ -411,7 +411,7 @@ function ajax_base_page_theme() {
+    if ($theme === config('system.theme')->get('default', 'stark') || drupal_valid_token($token, $theme)) {

you can't have default values on config().

gdd’s picture

Status: Needs work » Closed (duplicate)
gdd’s picture

Issue summary: View changes

updated description of issue and the link to the meta-bug that tracks the configuration settings