Wrong unpublished content language is displayed to users without "translate any entity" permission

Created on 12 January 2018, over 6 years ago
Updated 21 April 2023, about 1 year ago

Problem

On a multilingual site, is not possible for a user without "translate any entity" (or any other "translate [BUNDLE] [ENTITY]" permission) to view unpublished content.

My use case is very simple, I want to create a view of unpublish nodes, showing the title of the same translation as the current page language.
Configuration:

  1. multilingual site with at least 2 languages (FR/EN)
  2. a view (as attached) that displays nodes in any state and in the current page language
  3. create 1 node in FR (will be the main node). Give it a distinctive name (ex: "test FR")
  4. translate "test FR" into "test EN"
  5. make sure that "translate any entity" (or any other "translate [BUNDLE] [ENTITY]" permission) is disabled for Anonymous user
  6. access the view in EN version with the anonymous user.

Current result:

  • the title "test FR" will be displayed

Expected result:

  • the title "test EN" should be displayed

Workaround

Use at your own risk!
One way to make this work correctly is to check "Disable SQL rewriting" on your view query options

Proposed resolution

The rendered entity should always be in the language defined in the view.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Content translationΒ  β†’

Last updated 11 days ago

No maintainer
Created by

πŸ‡΅πŸ‡ΉPortugal rutiolma

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024