Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jan 2006 at 19:22 UTC
Updated:
22 Jan 2006 at 07:14 UTC
All our admin/settings page no longer revert to default values when the [Reset to defaults] is pressed.
Comments
Comment #1
DriesK commentedAre you sure about that? Because what happens on my install is the following: the settings _are_ actually reset to the defaults, but right after hitting the reset button, the form still _shows_ the old values. But, once you click 'settings' in the menu, the correct (resetted) values are shown.
This is a consequence of the forms API. The resetting happens in system_settings_submit(), which is called by drupal_form_submit(). And drupal_form_submit() is called after _form_builder() in drupal_get_form(). So what happens is that a button of #type submit is clicked, causing the $_POST values to be inserted as #value in the form by _form_builder(), and $_POST obviously contains the current, unresetted values.
Not sure what's the best way to solve this though...
Comment #2
DriesK commentedand by drupal_form_submit() I meant drupal_submit_form() of course :-)
Comment #3
chx commentedYou sure this has not been fixed lately by Steven's adding drupal_goto to system_settings_form_submit ? Or that patch is not yet in?
Comment #4
DriesK commentedYou're right, Steven's patch was committed last night. I missed it. The problem is gone in latest HEAD for me. Bèr, can you confirm and close this issue if all works well for you?
Comment #5
Bèr Kessels commentedDriesK, chx, yes, updating to head fixed this. It was indeed the goto issue that caused this "bug" to appear.
Thanks a lot for your time.
Comment #6
dries commented