form doesn't show with FOOtheme or FOO_theme

JohnAlbin - October 17, 2007 - 11:07
Project:Theme Settings API
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:JohnAlbin
Status:closed
Description

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$)/.

#1

JohnAlbin - October 18, 2007 - 00:02

Fixed.

#2

JohnAlbin - October 18, 2007 - 00:03
Version:5.x-2.x-dev» 4.7.x-2.0
Status:active» patch (to be ported)

#3

JohnAlbin - October 18, 2007 - 00:03
Status:patch (to be ported)» fixed

Fixed.

#4

JohnAlbin - October 18, 2007 - 00:04
Version:4.7.x-2.0» 6.x-1.0
Status:fixed» patch (to be ported)

#5

JohnAlbin - October 18, 2007 - 00:04
Status:patch (to be ported)» fixed

Fixed.

#6

JohnAlbin - October 18, 2007 - 00:04
Version:6.x-1.0» 6.x-2.x-dev
Status:fixed» patch (to be ported)

Porting…

#7

JohnAlbin - October 18, 2007 - 00:05
Status:patch (to be ported)» fixed

Fixed.

#8

Anonymous - November 1, 2007 - 00:12
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.