If you have set a minimum length for the exposed fulltext filter, and the user enters less than that value, clicking on reset after receiving the "You must include at least one positive keyword with X characters or more." will retrigger the validation, causing an endless loop of error messages.

The include patch checks if the triggering element has the same value as the form reset element value and skips the rest of the validation at that point.

Comments

chrisclark created an issue. See original summary.

drunken monkey’s picture

Version: 7.x-1.26 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new876 bytes
new801 bytes

Thanks a lot for reporting this problem and already providing a patch!
You’re right, I could reproduce the error, and while this is pretty surely a bug in Views itself, not in our module (it stands to reason that the “Reset” button should not trigger any validation at all), it seems sensible to still fix it right here, as there is hardly a chance this would ever get fixed in Views itself.

Your patch just has one problem, namely that it will trigger a notice/warning if the view doesn’t have a “Reset” button. The attached revision should fix that (and also defend against #triggering_element not being there, just to be on the safe side). Please test/review!

drunken monkey’s picture

Could you please test and/or review?

drunken monkey’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rahaf albawab’s picture

Version: 7.x-1.x-dev » 8.x-1.31
Priority: Normal » Major
StatusFileSize
new762 bytes

The issue still appear in version 8. I create a new patch to solve the same issue.