When the themekey is enabled, and no rules match, themekey changes the global variable $custom_theme from the name of the default theme to the string 'default'. This breaks the Skinr module, since it's settings are saved for each theme, under the name of the theme.

The following patch ensures that the name of the $custom_theme does not change to 'default' when the default theme is the one that matches the rule. Instead, the actual name of the default theme is retained.

Comments

mrfelton’s picture

StatusFileSize
new485 bytes
mrfelton’s picture

Status: Active » Needs review
mkalkbrenner’s picture

Status: Needs review » Needs work

themekey_match_rules() is called by themekey_init():

$theme_candidate = themekey_match_rules();
//...
if (!empty($theme_candidate) && $theme_candidate != 'default') {
  //...
  $custom_theme = $theme_candidate;
  //...
}

So it's OK that themekey_match_rules() returns 'default'.

So if the global variable $custom_theme is set to 'default' in your setup, the bug must be caused somewhere else and your patch is not the correct solution.

mkalkbrenner’s picture

Assigned: Unassigned » mkalkbrenner
Status: Needs work » Needs review
StatusFileSize
new1011 bytes

Are you using ThemeKey UI?

I discovered the bug there.

Please, check if my patch solves your issue.

mkalkbrenner’s picture

Title: Incompatibility with Skinr » don't set $custom_theme to 'default'
mkalkbrenner’s picture

StatusFileSize
new2.73 KB

same for 7.x

mkalkbrenner’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.