Download & Extend

form doesn't show with FOOtheme or FOO_theme

Project:Theme Settings API
Component:Code
Category:bug report
Priority:critical
Assigned:JohnAlbin
Status:closed (fixed)

Issue Summary

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

#1

Fixed.

#2

Version:5.x-2.x-dev» 4.7.x-2.0
Status:active» patch (to be ported)

#3

Status:patch (to be ported)» fixed

Fixed.

#4

Version:4.7.x-2.0» 6.x-1.0
Status:fixed» patch (to be ported)

#5

Status:patch (to be ported)» fixed

Fixed.

#6

Version:6.x-1.0»
Status:fixed» patch (to be ported)

Porting…

#7

Status:patch (to be ported)» fixed

Fixed.

#8

Status:fixed» closed (fixed)
nobody click here