Timeline for Override node title validation
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 26, 2012 at 17:11 | history | edited | amateur barista | CC BY-SA 3.0 |
added 3 characters in body
|
Jan 26, 2012 at 5:24 | comment | added | amateur barista | Wow. That's one tricky error! Well, like I said, most likely form_error() is getting called. To find out who's calling it first, feel free to drop a debug_bactrakce() in it, and then you can take it from there. | |
Jan 26, 2012 at 2:26 | comment | added | Alex Weber | Turns out I was already using a hook_form_BASE_FORM_ID_alter, still no go, by the time it reaches my validation callback it already has the error | |
Jan 26, 2012 at 1:57 | comment | added | Alex Weber | Good catch, I'll try that out! | |
Jan 25, 2012 at 18:03 | comment | added | amateur barista |
Also, have you checked out hook_form_BASE_FORM_ID_alter ? I've never used it, but could it be that the form you are targeting has a base form, which also specifies a "base form validator"?
|
|
Jan 25, 2012 at 17:58 | comment | added | amateur barista |
If you can confirm 100% that your validator is the first, and by the time you break into your validator you have an error in the form, then most likely form_error() is being called outside a validator (read: no-no, naughty code). If this is indeed the case, then just break into form_error() and see who's calling it.
|
|
Jan 25, 2012 at 17:51 | comment | added | amateur barista |
If you put error_log(__FUNCTION__) in each of the functions mentioned in the validator array, what do you get? Is your validator truly the first? If it is, then your problem is beyond hook_form_alter() and it might lie in some core code. If it not the first, then you might be missing a step from my solution.
|
|
Jan 25, 2012 at 17:31 | comment | added | Alex Weber | I already did that and no go! :( | |
Jan 25, 2012 at 16:31 | history | answered | amateur barista | CC BY-SA 3.0 |