By quineto on
I cant change the dafault time zone in the date settings form, when I tried I get the message:
"An illegal choice has been detected. Please contact the site administrator."
For example the default time zone:
Sunday, June 25 2006, -19:22 +0000
I try to change it to:
Sunday, June 25 2006,- 14:22 -0500
when I submit this change I recive the error message
The administrative logs show:
Type form
Message Illegal choice in Default time zone element.
Severity notice
I am running in Linux, red hat
php 4.3
drupal 4.7
any ideas about what could be the problem, Thanks!
Comments
Interesting. Can you attach
Interesting. Can you attach the source of the form? That is, click "View Source" when you're at that settings page, and do copy&paste into a text file.
This is the default drupal
This is the default drupal system form configuration in "administer >> settings "
and this is the source of the form, only the part where the date settings option are displayed
like a comment a few days ago I fixed a problem about PCRE that did not allowed the system to save any data from the global system settings.. this solution is described here http://drupal.org/node/43567
but either before and now the systems does not allowme to change the default time zone.
thanks, I appreciate your help
Does it happen only in the
Does it happen only in the time zone select-box?
Other select-boxes work fine?
And does it happen only when you select the -05:00 time zone?
I'll try to explain why drupal complains:
Your browser should send a "-18000" string to drupal, but for some reason, drupal sees a different string, one which is not in the list you see there ("-36000" to "46800"). The question is, what string does drupal see. Unfortunately, I've just discovered a tiny bug in 'form.inc' that doesn't let us see this string in the administrative logs. You should see an "Illegal choice blahblahblah in Default time zone element" message, but instead you only get to see "Illegal choice in Default time zone element" :-(
Do you know how to apply the patch in the above link?
Yes, it happen only in the
Yes, it happen only in the time zone select box and other select boxes work fine.
it happens with all other values that i slect from the menu not only the -05:00 value
thanks amnon
Now the form shows this
Now the form shows this message after I apply the patch in form.inc
Type form
Date Monday, June 26, 2006 - 16:31
User quineto
Message Illegal choice -28800 in Default time zone element.
Severity notice
It doesn't like the negative index
And most likely, it's just another problem with the wretched PHP 4.3.2.
An ugly hack of casting the negative key to integer helped.
In includes/form.inc, replace (line 244)
elseif (!isset($options[$elements['#value']]) )with
elseif (!isset($options[$elements['#value']]) && !isset($options[(int)$elements['#value']]) )