The module currently determines the theme key inside form_alter() by striping theme_ and _settings from the $key in the form.

Unfortunately, themes named FOOtheme or FOO_theme have a form $key of "theme_FOOtheme_settings" or "theme_FOO_theme_settings". And striping off theme_ and then _settings results in a theme name of "FOOsettings" or FOO_settings" and will cause the inclusion of the theme-settings.php to fail.

Since modules and themes share a namespace, many custom modules and themes for a site are named SITE (module) and SITEtheme (theme). So this is actually a common occurrence.

I could strip _settings and then strip theme_, but we would have problems with themes named settingsFOO. So I’ll use a regexp /(^theme_|_settings$)/.

Comments

johnalbin’s picture

Fixed.

johnalbin’s picture

Version: 5.x-2.x-dev » 4.7.x-2.0
Status: Active » Patch (to be ported)
johnalbin’s picture

Status: Patch (to be ported) » Fixed

Fixed.

johnalbin’s picture

Version: 4.7.x-2.0 » 6.x-1.0
Status: Fixed » Patch (to be ported)
johnalbin’s picture

Status: Patch (to be ported) » Fixed

Fixed.

johnalbin’s picture

Version: 6.x-1.0 »
Status: Fixed » Patch (to be ported)

Porting…

johnalbin’s picture

Status: Patch (to be ported) » Fixed

Fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)