I went through all the steps of making the Views filter for my entity reference field a select list by editing the field configuration and enabling the "Enable Render Views filters as select list" but I go to a view and add a filter for my field (which has only about 15 possible values), the View does not work because it returns the error "The operator is invalid on filter: Content My field name".

Comments

dave reid’s picture

If I save the View anyway and go to my View page, I get the following:
Notice: Undefined index: field_office_target_id in views_handler_filter->accept_exposed_input() (line 1260 of sites/all/modules/views/handlers/views_handler_filter.inc).

haydeniv’s picture

You need to reset the filter operator in the view filter if you created the view before checking "Enable Render Views filters as select list" on the field options.

The reason being the comparison operators have a different key due to different options being available. Drove me nuts the first time I ran into this while that feature was being developed.

dave reid’s picture

Status: Active » Fixed

Yeah so the problem was even though I had fixed the current View display I was working on, the preview was still showing me errors about filters on every other display. So once I went through and fixed all the other display filters to use the 'Is in' operator for my entity reference field, the view could save and it worked as expected.

Status: Fixed » Closed (fixed)

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