This problem is common to both devel and devel_forminspect settings forms.
When I hit "Save" in my devel settings form, the resulting page is rendered using old form values. However, the submitted values are saved correctly and are loaded when I open settings page in a new window/tab. The easiest way to demonstrate this problem is to use "Display form element keys and weight" box. If originally this box if Off, we would click it On and submit form. Returned form would have the box Off AND form weights not displayed. However opening settings page anew would have both box On and weights shown.
I am not sure whether this is a bug in the module (e.g. how forms are used) or some general configuration issue with PHP / sessions / etc. I do not even know where to start looking for a fix to this...
Comments
Comment #1
dkruglyak commentedI did a little more investigation... The form submission goes through fine all the way to 'header' call in drupal_goto... However then seems like the redirect fails, with watchdog log getting these two messages:
I googled this error and found a similar issue here (http://drupal.org/node/131032) about Devel printing no output. The solution in that issue was to try a default theme. However I tried Garland and this did not fix the problem for me.
What could be the root cause of the error I am getting?
Comment #2
dkruglyak commentedYet another datapoint... I tried the same test on a Drupal install with Garland theme and most modules turned off. The reload of submitted values worked OK, but the watchdog log contains the same errors... Go figure.
Comment #3
dkruglyak commentedThis seems to be the problem with all other forms that must reload themselves after saving... Help!
Comment #4
dkruglyak commentedWith more research, I think I found the root cause. First the diagnositcs:
1) Watchdog entries are thrown by devel_shutdown function and go away when I turn off devel timer/query display
2) To check whether the new pages are generated, I added the following line to the top of index.php
3) Every time the problem occured (form returns old values), the page always had the old timestamp.
This means the problem is browser caching. I tried this in IE 7 and FF 2 with and without Firebug. The problem only showed up in FF with Firebug. Presumably when drupal_goto sets header location the same as existing page Firebug destroys the redirect, while IE and FF follow it fine.
When Firebug is disabled the problem goes away. Filing an issue for Firebug developers.
Comment #5
dkruglyak commentedFinal post! Looks like the cause was not even Firebug itself but YSlow plugin http://developer.yahoo.com/yslow/
YSlow breaks page reload when set on Autorun, which is not even a very useful option anyways. Turning off Autorun solves the problem, so at this point this is just the documentation matter. Updated bug report on Firebug here:
http://code.google.com/p/fbug/issues/detail?id=273&start=200
There is still need to fix watchdog messages, not related to the original bug: http://drupal.org/node/172263
Comment #6
nielsbom commentedNot a documentation issue.
Comment #7
dkruglyak commentedThe issue should be obsolete by now...