Steps to reproduce:
1) Add a filter (any filter), and expose it.
2) Try to set the identifier to "value" or to a identifier already in use
Result:
The form closes, and the validation message is not displayed. The submit function did not run, and the new settings haven't been saved.
Additional WTF:
The default value of the identifier field is ''.
So, if you leave the identifier field empty, it will save the form.
expose_validate() does not run, and the behaviour above does not happen, even though it should, since expose_validate() also checks that the field is not empty.
All this is not an issue in Views-6.x-3.x, only in the D7 version.
Comments
Comment #1
bojanz commentedAlso, if the settings form is saved with an empty identifier field, bad things happen, among them:
These notices were mentioned in the original issue (#868808: Exposed filters are broken).
Comment #2
iamjon commentedbojanz,
is this error still occuring?
Comment #3
bojanz commentedLast I checked (a week ago), it did.
Will recheck and update the issue, but I'm not optimistic about it fixing itself without human intervention.
Edit: Still not working.
Comment #4
bojanz commentedOkay, so the problem is similar to the "Override" one that we fixed (thanks to merlinofchaos) a few weeks back:
The options form isn't getting re-rendered after failing validation, so the error never gets displayed, the form just closes.
This affects every options form: filters, sorts, doesn't matter which...
My solution might be a bit crude, but in any case I think this is the right piece of code to put rerender in, otherwise we'd have to add the code to each options_validate() function.
Also, my editor likes to fix whitespace issues.
Comment #5
bojanz commentedThis one's nicer.
Comment #6
bojanz commentedHad one line too many. Looks like I need sleep :)
Comment #7
dawehnerHere is a patch which adds testing of
* date filter validation
* exposed filter validation
Comment #8
dawehnerAwesome, this bug is fixed now!
Test changes ported to d6.