Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- Go to admin/build/themes/settings (Themes -> configure -> global settings).
- Toggle any of the checkboxes.
- Click the “Save configuration” button.
The resulting page says “The configuration options have been saved.” but the settings still show the defaults and not the changes.
The theme_settings
variable in the variable
database table does not show the changes either.
Comment | File | Size | Author |
---|---|---|---|
#6 | system_settings_form.patch | 1.91 KB | JohnAlbin |
#5 | theme_settings.diff | 412 bytes | riccardoR |
Comments
Comment #1
hass CreditAttribution: hass commentedthis is working on my box. i'm using the build i've downloaded some minutes ago.
Comment #2
hass CreditAttribution: hass commentedignore my last posting, i tested on 5.x-dev... :-(. Under 6.x-dev i'm able to repro this bug, too.
Comment #3
hass CreditAttribution: hass commentedsave on a theme specific settings page additional gives me this error:
Comment #4
hass CreditAttribution: hass commentedcheck out http://drupal.org/node/138706... maybe the cause?
Comment #5
riccardoR CreditAttribution: riccardoR commentedI think hass is right.
The theme_seetings variable is no longer stored in the variable database table as a serialized array (like in Drupal 5), but as a set of independent values :
This make me think of an error in the settings form submit handling because of the different logic in FormAPI3.
I have tried to set the appropriate form submit handler in system_theme_settings() getting inspiration from system_admin_theme_settings() that is working. This change has restored the correct behaviour :
Patch against HEAD attached.
I am not sure if this is the orthodox solution, but at least it fixes the issue: now I am able to save any theme settings.
BTW, I cannot access the theme specific pages, with or without this patch.
Thanks,
Riccardo
Comment #6
JohnAlbinThe FAPI3 patch (#138706) is indeed the issue.
system_settings_form()
is modified to include these lines:Which means
system_settings_form_submit()
is called instead ofsystem_theme_settings_submit()
.This patch fixes that issue.
BONUS: because of the additions to
system_settings_form()
, the Administration Theme and Performance forms were showing “The configuration options have been saved.” twice when submitted. The patch fixes that as well.Comment #7
JohnAlbinComment #8
Dries CreditAttribution: Dries commentedJohn's patch looks good. Feel free to RTBC this after you confirmed that it fixes the problem.
Good catch.
Comment #9
JohnAlbinI’ve verified the patch fixes all 3 forms.
Comment #10
Dries CreditAttribution: Dries commentedCommitted to CVS. Thanks, John.
Comment #11
(not verified) CreditAttribution: commented