When using an IN operator, the code introduced in "Allow additional field-to-field conditions with the default views_join handler (1090432)" causes the clause to fail if only a single value is provided. This is due to a check that changes the value formatting from "(value)" to "value" but fails to change the operator from "IN" to "=". This is due to the code defaulting back to the join info setting at the end of the extra handler in "build_join()" method (views/include/handlers.inc".

$operator = !empty($info['operator']) ? $info['operator'] : '=';

The $info array must have the operator when forcing a single value array to scalar. See proposed patch.

Comments

robertwb created an issue. See original summary.

robertwb’s picture

robertwb’s picture

Status: Active » Needs review
maximpodorov’s picture

I have the problem also (with NOT IN filter).

robertwb’s picture

Hey @maximpodorov - did you try the patch in #2? It fixes my use case.

maximpodorov’s picture

Unfortunately, #2 doesn't fix NOT IN filter.

jcnventura’s picture

This didn't fix the issue.

jcnventura’s picture

Status: Needs review » Closed (outdated)

That code was now reverted. Closing this issue.