Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
forms system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2007 at 17:01 UTC
Updated:
6 Jan 2008 at 12:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedlooks good. thanks.
Comment #2
gábor hojtsyWe don't use the edit array on form elements since (maybe) 4.7. So the example needs that removed.
Comment #3
oadaeh commentedIs this better?
Comment #4
oadaeh commentedIt seems as thought my comments aren't being applied, nor am I receiving any of the notices.
I'm going to try attaching the updated patch again.
Comment #5
gábor hojtsyHmmm. I suggested removing the edit array not the whole note about nested arrays. The edit array itself was removed the nested arrays are still handled with this construct as far as it looks from form_get_error(), which I just checked.
Comment #6
oadaeh commentedOkay, I guess I didn't understand what you meant.
Just for my own clarification, are you saying that "If the name of the element is 'edit[foo][bar]', then you may pass either 'foo' or 'foo][bar' as $name." is no longer valid, but "Passing 'foo' will set an error for all its children." is still valid?
Or, are you saying that "If the name of the element is 'edit[foo][bar]', then" is no longer valid, but "You may pass either 'foo' or 'foo][bar' as $name. Passing 'foo' will set an error for all its children." is still valid?
Comment #7
gábor hojtsyThis is the text from your patch:
I said we do no use "edit" anymore, so remove "edit":
This is what I said. I did not say anything about whether this is right now or not. I looked into http://api.drupal.org/api/function/form_get_error/6 which says the
foo][barform is supported indeed. Whether passing 'foo' sets an error for all children is a different question. It depends on how form_get_error() is actually used. However, I don't see that this is the case, look into http://api.drupal.org/api/function/_form_set_class/6. It only sets the class or the current element.So while I pointed out the error with the "edit" element, it did not had any consequences on other parts of the note. Those needed further digging.
Comment #8
chx commentedWell, if we want to be precise then this is the patch you want. Speaking of children is highly innacurate. Note that this patch can be applied to D5 and D4.7 -- though D4.7 did use $edit but this has nothing to do with form_set_error, actually. We need to work on this error setting thing on D7, these legacy functions are ugly to say the least.
Comment #9
gábor hojtsyThanks, committed.
Comment #10
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.