Problem/Motivation
When a taxonomy exposed filter is active with a value, the request has a clause like 'taxonomy_xx != ' + "last value of taxonomy list " when he is combined with the same filter non exposed to filter datasource
Steps to reproduce
- Create Vocabulary XX
- Create terms x1, x2, x3, x4
- Add field taxonomy term to article content type with unlimited terms and attach Vocabulary_xx
- Create nodes with a couple of vocabulary terms
- Create view with articles
- Add filter for term field non exposed with x1, x2 and x3 selected values
- Add exposed filter for term field with x1, x2 and x3 selected values and "limit list to selection items" option checked
Result:
filters x1 and x2 work apparently well but x3 result is empty, if you check the query, there are a left join with 'taxonomy_xx != x3_id' in all request.
When x3 term is selected, request has a 'taxonomy_xx != x3_id' in left join and 'taxonomy_xx = x3_id' in where clause
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | query-filter.PNG | 34.11 KB | mcalduch |
| query-no-filter.PNG | 27.01 KB | mcalduch |
Issue fork drupal-3401605
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mcalduch commentedComment #3
mcalduch commentedComment #4
lendudeConfirmed on Umami install with the Difficulty field which isn't a term field, so any field that is rendered as select seems to be able to break this
Comment #6
lendudeAdded a fix and test coverage, but the fix seems to break something so need to look at that
Comment #7
lendudeThe existing coverage breaks and shows too much when checking for the current value and the new coverage breaks if we don't check for this, trying to wrap my head around this but good to see the existing coverage is there
Comment #11
sakthi_dev commentedResolved the conflicts.