When I enable "Account administration pages language setting" on admin/config/regional/language/detection and choose a language on my user profile, I can't edit or view translations but only the node in the source language.

Steps to reproduce:

  • Create a Drupal site, enable the relevant language and translation modules.
  • Choose or add languages, here: Spanish (default), English, German.
  • Enable the translation for a content type, e.g. Basic page.
  • Enable the following detection methods: Account administration pages, URL (Path prefix).
  • Choose English as "Administration pages language" on your user profile.
  • Create a node in Spanish.
  • Add an English and a German translation.

So far all fine! Continue as following:

  • Visit the source node, hit the Translate tab to edit one of the translations.
  • On example.com/es/node/1/translations choose the English (or German) translation, and click Edit.

Unwanted result: You see the (correct) URL example.com/en/node/1/edit, however you are not editing the translation but the source node, the page title is something like "Edit Basic page XYZ".

Expected behaviour: You edit the translation. (In this case the page title would be "Edit Basic page XYZ [English translation]").

When I try to view the English translation going to the source node and using the Language switcher block, I'm confronted with the same problem: The URL that I get seems correct (example.com/en/node/1), but I stay on the Spanish content.

Steps to avoid the problem:

  • Disable the detection method Account administration pages, OR
  • Select No preference as Administration pages language on your user profile.

In my opinion, the issue is very critical for admin users or editors who don't understand the default language of a site. Thus, I couldn't believe that I didn't find a relevant bug report in the issue queue. Did I miss something?

Comments

Olafski created an issue. See original summary.

Olafski’s picture

Priority: Normal » Critical

I just tested the bug again, this time in a new simplytest.me Drupal 8.1.8 installation without contrib modules. The behaviour is the same: When I enable "Account administration pages language setting" and choose a language on my user profile, I can't edit or view translations.

Marking this as "Critical" as I can't build a certain multilingual site in the moment. I don't understand the standard language of the site and need to use English as admin language which doesn't seem to be possible.

Can someone confirm the bug, or am I still missing something?

swentel’s picture

Since there is a workaround, this shouldn't be necessarily critical.

Also, reading on #2189267: When content language detection is different from interface language detection, the detected language is not applied to the rendered content, this seems to duplicate that one.

Olafski’s picture

Thanks @swentel for the link to the related issue!

The patch in comment #24 of the issue fixed the problem. NB: To get the fix working you have to tick "Customize Content language detection to differ from Interface text language detection settings" on admin/config/regional/language/detection and set the Content language detection to the same value as the Interface text language detection.

Regarding the priority, I'm removing "Critical" because of the patch in the related issue. (The above mentioned "Steps to avoid the problem" don't work as workaround for all users.) However, I closed this issue as duplicate. Thanks again!

divined’s picture

Page title not in needed language.

Default langugae: France.
Administration language: English.

On the administrative pages titles displayed in France language, other content - in English.

Page title dispplayed as a page title system block.

But strange: Only "Homepage list" displayed as "Page d'accueil list", or "Homepage settings" as "Page d'accueil settings".
Other titles looks good.

This page is CustomEntity - listBuilder page and settings page.

divined’s picture

The same with breadcrumbs.

mayap’s picture

Have you tried setting up the Administration language to -No preference- for each user?
The solution was proposed here and it worked for me! :)
https://www.drupal.org/node/2781921#comment-12118866