I discovered a bug in the handler for taxonomy term filters. Translated term reference filters are not handled the same as default, non-translated filters. The bug manifests itself as follows:
1, In a node view, add Term Reference field filter. Choose the default, non-translated field.
2. Expose the filter.
3. Select a few of the terms, and check Allow multiple selections and Limit list to selected items.
4. In your exposed filter form, the terms you have chosen are shown, and none are selected by default. This is the correct behaviour.

Now, follow the same steps again, but this time use the translated version of the term reference field. In the exposed filter form all of the terms are selected by default, so the view results are limited unless you uncheck the terms.

The code in i18nviews_handler_filter_taxonomy_index_tid.inc in at fault. If you compare it to views_handler_filter_term_node_tid.inc it turns out that some time in the past the Views code changed. The single option disappeared and was replaced by multiple. And optional disappeared and was replaced by required.

I've created a patch that fixes the bug, and will attach it below.

Comments

Status:Active» Needs review
StatusFileSize
new1.25 KB

Here's the patch.

This works great for me; thanks for saving me big time! To commit!

Status:Needs review» Reviewed & tested by the community

This fixes the issue for me.

I can confirm that the patch applies fine and solves the issue.