0

I have a need to display a block with nodes from different content types. The content types contain different fields, and I would like to filter based on different criteria of each type. I had hoped to use the grouping function of Filter Criteria, but it's not operating as expected.

I am using two content types, Article and Career. Career has a Status field, which indicates if the career posting is open or closed. The filter criteria I have designed looks like:

enter image description here

Each part on it's own works as expected.. so if I remove "OR (Career AND Open)", I get a list of articles that meet the criteria. Conversely, if I remove "(Article AND Published AND Promoted) OR", I get open careers.

Together, I get the result of the 2nd group - I only get open Careers, and no Articles.

If it matters (not sure that it does .. ?), the fields I'm displaying are the node title, and two custom fields that are common to both content types.

Help please?

0

I think this is a bug/changed behavour in views introduced a long time ago.

A workaround might be to select the Reduce duplicates checkbox from one of the fields in OR group filter - which will transform your query to LEFT JOIN instead of INNER JOIN.

Drupal Views - Reduce duplicates checkbox

I found the solution here: https://www.drupal.org/node/1766338#comment-6973984

It worked for me in Views 7.x-3.13

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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