[drupal-devel] Talk with Rasmus
Hello, Over the last couple of days I have had a couple of conversations with Rasmus Lerdorf about php things and one thing that is done in drupal which is broken on Yahoo php servers. Basically with checkboxes so that we always get a value we set the unchecked value as a hidden field, and then a check box of the same with the checked value. so when the data is passed to the server it is passed like so a=false&a=true We expect that from this we will receive a=true, but with the way that we are yahoo servers are configured they will receive the following. array(false, true) I know that the approach that we are implementing is a bit of a hack to get around problems with html. but is there a better method that could be used. I am not saying that we need to do something, but I think being able to allow Yahoo to use drupal much easier, since they are using Drupal internally, I think would be a good thing. Gordon.
I know that the approach that we are implementing is a bit of a hack to get around problems with html. but is there a better method that could be used.
There is. My fix_checkboxes patch is already in the queue, that could be expanded to fix_form which would apply to anything that can be empty: multiple selects, radio, single checkbox. Talk is silver, code is gold. Let's make something golden... Regards NK
Hello, On Sat, 2005-04-23 at 13:13 +0200, Karoly Negyesi wrote:
I know that the approach that we are implementing is a bit of a hack to get around problems with html. but is there a better method that could be used.
There is. My fix_checkboxes patch is already in the queue, that could be expanded to fix_form which would apply to anything that can be empty: multiple selects, radio, single checkbox.
Talk is silver, code is gold. Let's make something golden...
and being able to find the patch is better. ;-) I have looked and I cannot find the link patch that you are talking about. Can you please post a url, and I will add my vote to it. Gordon.
I have looked and I cannot find the link patch that you are talking about. Can you please post a url, and I will add my vote to it.
I first posted the letter then begin expanding that patch. However, here it is: http://drupal.org/node/18663
HTML checkboxes suck this way, but no other type of input element does, to my knowledge. I haven't reviewed your patch, but my guess is that since named inputs will always be contained in the form (even when empty), no workaround is necessary for non-checkboxes. On 4/23/05, Karoly Negyesi <karoly@negyesi.net> wrote:
There is. My fix_checkboxes patch is already in the queue, that could be expanded to fix_form which would apply to anything that can be empty: multiple selects, radio, single checkbox. -- Brian Del Vecchio | bdv@hybernaut.com | http://hybernaut.com/
Brian Del Vecchio said:
On 4/23/05, Karoly Negyesi <karoly@negyesi.net> wrote:
There is. My fix_checkboxes patch is already in the queue, that could be expanded to fix_form which would apply to anything that can be empty: multiple selects, radio, single checkbox.
HTML checkboxes suck this way, but no other type of input element does, to my knowledge. I haven't reviewed your patch, but my guess is that since named inputs will always be contained in the form (even when empty), no workaround is necessary for non-checkboxes.
For what it's worth, you may want to check out the Web Forms 2.0 spec.[1] and send comments if you want this fixed in a spec. [1] http://www.whatwg.org/ -- Tim Altman
On Sat, 23 Apr 2005, Gordon Heydon wrote:
Basically with checkboxes so that we always get a value we set the unchecked value as a hidden field, and then a check box of the same with the checked value. so when the data is passed to the server it is passed like so
a=false&a=true
We expect that from this we will receive a=true, but with the way that we are yahoo servers are configured they will receive the following.
array(false, true)
Did he tell you which config opton does cause this behaviour? Cheers, Gerhard
Basically with checkboxes so that we always get a value we set the unchecked value as a hidden field, and then a check box of the same with the checked value. so when the data is passed to the server it is passed like so
a=false&a=true
We expect that from this we will receive a=true, but with the way that we are yahoo servers are configured they will receive the following.
array(false, true)
Did he tell you which config opton does cause this behaviour?
I don't think there is a config option for this in PHP. At least it is not documented. They have the liberty to do whatever with PHP at Yahoo. If there is a such a setting, it should be documented. Rasmus? Goba
Hello, On Sat, 2005-04-23 at 12:56 +0200, Gerhard Killesreiter wrote:
On Sat, 23 Apr 2005, Gordon Heydon wrote:
Basically with checkboxes so that we always get a value we set the unchecked value as a hidden field, and then a check box of the same with the checked value. so when the data is passed to the server it is passed like so
a=false&a=true
We expect that from this we will receive a=true, but with the way that we are yahoo servers are configured they will receive the following.
array(false, true)
Did he tell you which config opton does cause this behaviour?
He didn't say, I think it was a modification that he made to the php himself. Gordon
participants (6)
-
Brian Del Vecchio -
Gabor Hojtsy -
Gerhard Killesreiter -
Gordon Heydon -
Karoly Negyesi -
Tim Altman