Hello,

I have installed Search API and create two filter criteria in my view : one for taxonomy (town) and one for title.
When I check "Required" in my filter criteria, I have an error in my view:
http://img15.hostingpics.net/pics/180256caps17.png
http://img15.hostingpics.net/pics/890561caps18.png

An error (without text) appear in my view, but I can save it even so:
http://img15.hostingpics.net/pics/601396caps19.png

I have an error (without text) in pages my site:
http://img15.hostingpics.net/pics/356113caps20.png

Here is the html code:
http://img15.hostingpics.net/pics/355336caps21.png

Do I something wrong or is it a bug?

Thx.

Comments

floown created an issue. See original summary.

floown’s picture

Issue summary: View changes
floown’s picture

Issue summary: View changes
drunken monkey’s picture

Category: Bug report » Support request
Status: Active » Fixed

This looks to me like it has nothing to do with the Search API and is just normal Views (or, Drupal Form API) behavior. You add a required input field with no default value – so there is a validation error when first viewing the view. After adding filters, it vanishes. (The error message is empty because the form field seems to have no title associated – that seems a bug in and of itself, but also not in this module.)

For making exposed filters required, maybe try setting the exposed form style to "Input required".

floown’s picture

Hello,

I have done like you suggest to chose "Input required" but the validation is the same: I can enter no entry. Then I have try to check de "Required" in each of filter criteria: the alert is back.

I have no solution. I have use a "display: none;" for alert until I found a admissible solution :\

If you have one another, thanks!

floown’s picture

Version: 8.x-1.0-beta2 » 8.x-1.x-dev
Status: Fixed » Active
floown’s picture

I have installed Search API on a Drupal 7 installation and I have no problem to check "Required"…

drunken monkey’s picture

Status: Active » Fixed

Be that as it may, it's still a Views problem. To test, just go to admin/structure/views/view/content and check "Required" for the "Title (exposed)" filter there. Now, when you go to admin/content, you will see the same problem.
Please either move this issue to the views.module component of Drupal Core, or create a new issue there. (Or, in all likelihood, find the issue that already exists for this.)

Status: Fixed » Closed (fixed)

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