If a theme defines the "features" that it supports (via setting features[] in its .info file), it might choose not to support one of the default core features.
Currently, the checkboxes for those features will not appear at admin/appearance/settings/THEMENAME, but if you call theme_get_setting(), you will still get back a result that says the feature is toggled on, which is incorrect.
The attached patch seems to fix it, although this part of the code is a bit tricky so I'm not 100% sure I got it right (especially with regard to subthemes, etc). If it seems like the right fix, we could also write a test for it.
Comments
Comment #1
jacinefix-theme-setting-features.patch queued for re-testing.
Comment #2
jacineI'm running into this bug now. This patch needs updating, but I tested and it works. However, I'm not sure about subtheme implications either.
The search feature has been removed since this patch was created.
Powered by Dreditor.
Comment #3
jacineComment #4
jacineWe can't ship D7 with broken theme settings. Marking this critical.
Comment #5
andypostQuick re-roll, list of default features was changed (now there's no search)
Comment #6
dries commentedMmm, the attached patch looks good but it also suggests that adding the features[] array to the .info file might not have been the best plan. This is a bit of a WTF.
Comment #7
sunThis patch needs approval of JohnAlbin. I'll try to ping him via IRC.
Comment #8
johnalbinNice catch, David!
I cleaned it up a bit since there's some existing variables we could have used, but its basically the same patch.
I also removed two dummy settings that weren't used anywhere; 'toggle_main_menu' and 'toggle_secondary_menu' are used, but 'main_menu' and 'secondary_menu' are bogus settings and likely just copy and paste errors made when rolling the patch in #160168: Let Primary and Secondary links be arbitrary menus as in the Drupal 5 menu system.
Comment #9
andypost+1 to commit
Comment #10
jacineJust tested and it works. Yay! Thanks guys. :D
+ 1 for commit
Comment #11
dries commentedCommitted to CVS HEAD. Thanks!