If you have it installed together with the Translators module you get some extra alternatives on the "Target Language" filter, to limit the language list to the users translation skills.
After you have installed both module you can check the views configuration here:
admin/structure/views/view/content_translations
However, when the user doesn't have any languages registered it no languages there, and you just see "- Any -" on the list, but still there are rows showing up in the list. It seems like it fallback to "Default site language". However, if there are no target languages in the filter then the view should always have 0 results

Comments

annya created an issue. See original summary.

annya’s picture

annya’s picture

Remove unused line of code.

annya’s picture

Status: Active » Needs review
matsbla’s picture

The patch solves the problem! However I tried to make a test for it to add, and while doing that I discovered and solved some other smaller bugs. When fixing those I realize that if default target language is set to default site language it is negotiated different if the target language filter is limited to translation skills. Here is an alternative approach that also seem like solves the problem. I'm still looking into it, and I also want to add an updated test.
I've tried to fix it here
#3088956: Make sure target langcode is valid
but seems like this patch now need to be adjusted.

matsbla’s picture

matsbla’s picture

matsbla’s picture

Fix typo
+ $this->options['groups'],
Should be $this->options['group']

matsbla’s picture

Undefined index: limit

matsbla’s picture

StatusFileSize
new11.61 KB

Update the view for testing in separate patch

  • matsbla committed bef427b on 8.x-1.x
    Issue #3088390 by matsbla, annya: Don't show any results if user has no...
matsbla’s picture

  • matsbla committed 44e7670 on 8.x-1.x
    Issue #3088390 by matsbla, annya: Don't show any results if user has no...
matsbla’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.