0

I'm having an issue with the "or" operator in a view acting like an "and" operator (at least, I think that's what it's doing).

The view is meant to display articles with either "Primary Feature" checked, or one of the "Secondary Feature" options selected. The "Secondary Feature" is a list of radio options with three values: Secondary Feature 1, Secondary Feature 2, Secondary Feature 3. I've tried setting up the view a couple ways, first with a single "Secondary Feature" filter using the "is one of" operator with all three values selected (first screenshot), and second with three "Secondary Feature" filters, each using the "is one of" operator with only one value selected (second screenshot).

first method

second method

There are only four articles these filters apply to, one with each type of feature selected (1 Primary Feature, 1 Secondary Feature 1, 1 Secondary Feature 2, and 1 Secondary Feature 3).

From the Googling I've done it seems that checking "reduce duplicates" fixes this issue for some folks but it doesn't here. When I check "reduce duplicates" on the Primary Feature and Secondary Feature filters, it displays the article with "Primary Feature" checked, but none of the articles with "Secondary Feature" checked.

Any ideas on how to fix this?

Edited to add: This is on Drupal 7.

1 Answer 1

0

I got this working — I had to check "distinct" under Advanced > Query Settings, uncheck "reduce duplicates" for the Primary Feature filter, check "reduce duplicates" for the Secondary Feature filter (set up as a single filter using the "is one of" operator with all three values selected), and clear the cache. Now it's working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.