Open bobchristenson opened 5 years ago
This appears to be related to: https://www.drupal.org/project/views/issues/1309578
Indeed it does...I don't remember ever encountering this in Drupal. Maybe I never had to use this exact combination? Not sure...
Just an fyi that I found a workaround: I had just ported Views Exposed Filters to backdrop: https://github.com/bobchristenson/views_selective_filters
If you use this as the exposed filter, you can use the 'standard' filter (normal field filter, not exposed) to limit the results. It ends up giving you a view limited to just the terms you want to use, but then also limits the items in the dropdown list as well. Works great.
I've got a content type called "Organization" (such as businesses, schools, etc). There is a taxonomy term on this content type of "Type". The available types are: School, Church, Business, Non-Profit. So I have one content type with 4 subcategories of this type.
Then I create a view of organization content. In this particular view, I only want to show School and Non-Profit organizations. So, I add a views filter on that 'type' field and in the resulting configuration I choose 'is one of' and I select those 2 types. This works as it should (not showing content of other types).
Now, I want to expose that filter (as a dropdown) and the filter (dropdown selector) should only show these 2 available types of School or Non-Profit. In order for the filter dropdown to ONLY show these items, I must choose "limit list to selected items".
When I look at the view, the filter correctly shows my options as "School" and "Non Proft", but also shows the "ANY" option as well (which will be the page default). The results of how this filter works are not correct.
If I choose "ANY" (or just use the page default with no filter selected) I now see ALL organization types (including church and business). It's no longer filtering out the types I excluded in the filter. If I choose the dropdown, I get proper filtered results.
So, it seems in this case the 'main filter' isn't respecting the core filter setting of "is one of" and the selected types.
PS: I tried a work around by adding a second "type" filter (not exposed) and limit the types..this didn't work properly either, giving me no results at all.