I have recently installed the theme "business" -> https://drupal.org/project/business

I've made a subtheme for it so I can start customizing it. I'm having one strange problem though.
When I go to Appearance -> *business childtheme* -> Settings and I change the theme build-in slideshow settings, they wont save.

For example: If I change the slide description and URL and click 'save configuration' the changes wont stick.
They will revert to their defaults.

I've been searching around for answers but I haven't been able to find it yet. (Tried different browsers, but that didn't do it.)
Does anyone know what could cause this?

Help is greatly appreciated!
Thank you in advance.

Comments

VM’s picture

how did you generate the subtheme?

tedsapling’s picture

Thank you for your reply.

I copied the base themes info file, added "base theme = business" and removed all the lines with "stylesheets[all][]"
Lines with scripts, regions and features I left in.

After your reply I opened up my info file again and found that it actually had settings in it (doh):
settings[slide1_desc] = "What We Do"
settings[slide2_desc] = "Who We Are"
settings[slide3_desc] = "Our Service"
settings[slide1_url] = "node/1"
settings[slide2_url] = "node/2"
settings[slide3_url] = "node/3"

I guess it has something to do with these. I tried deleting these lines from the .info file, but my changes inside admin -> appearance -> settings still don't stick.

Did I miss something or is changing the values inside the .info file the only way? Edit: changing values there doesn't change anything. I don't have a clue where to look atm.

Thank you in advance!

VM’s picture

https://drupal.org/node/225125

Theme settings inheritance

Theme settings set via advanced theme settings' theme-settings.php are not inherited, unless you copy the settings declarations from the parent theme's .info file.

Based on your comment and the above documentation it seems you did not copy the theme-settings.php file from business into your subtheme. Note that you will also have to change the function names in theme-settings.php to reflect the name of your subtheme.

tedsapling’s picture

Thanks for the reply.

That's something I overlooked and won't forget again!

I have copied the theme-settings.php to my subtheme.
Inside the php file I had to change:

function business_form_system_theme_settings_alter(&$form, &$form_state) {
to
function business_mytheme_form_system_theme_settings_alter(&$form, &$form_state) {

and

$form['busi_settings']['slideshow']['slide1']['slide1_desc'] = array(
'#type' => 'textfield',
'#title' => t('Slide Description'),
'#default_value' => theme_get_setting('slide1_desc','business'),
);

to

$form['busi_settings']['slideshow']['slide1']['slide1_desc'] = array(
'#type' => 'textfield',
'#title' => t('Slide Description'),
'#default_value' => theme_get_setting('slide1_desc','business_mytheme'),
);

The settings that I save now 'stick' inside the settings panel.
However they don't change on the website.
On the website the text in the settings from the .info file in the base theme still shows.
I can't get it to show the text in the settings from my subtheme.

Seems as if something is still pointing it back to the base theme instead of my subtheme.
Also the settings I change now 'stick' in the settings window but don't show anywhere else.