Updated: Comment #1

Problem/Motivation

When you have translated the site information (site name, slogan) and go to edit that translation, the *actual* site name and slogan are displayed translated, even if the actual admin page that you're on is an English one. I.e. you are on example.com/admin/... not example.com/de/admin/..., for example.

german-override-sticks.png

I can think of two possible reasons for this:
A: The language negotation system checks for the "langcode" query parameter (the actual url is e.g. http://drupal-8.loc/admin/config/system/site-information/translate?action=edit&langcode=de). That should not happen, though.
B: During the creation of the translation form the language configuration context is entered at some point, but never left, so when the site name part of the site does its $config->get() the language context ist still active and thus returns the translated values.

Steps to reproduce

  1. Install Configuration Translation module
  2. Create at least one additional language (URL: admin/config/regional/language)
  3. Go to the site information form (URL: admin/config/system/site-information)
  4. Click on the Translate settings tab and add a translation in the newly added language
  5. After saving the translation, go to edit it again

Proposed resolution

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

FileSize
116.47 KB

Here's a screenshot of the broken behavior.

tstoeckler’s picture

Issue summary: View changes

Wrap the long URL in < code > as it is being trimmed.

tstoeckler’s picture

Issue summary: View changes

Embedding the screenshot from #1 in the issue summary

tstoeckler’s picture

Issue summary: View changes

Updated issue summary.

Gábor Hojtsy’s picture

It may indeed be that the context is not left...

tstoeckler’s picture

Assigned: Unassigned » tstoeckler

Yes, I think I found the problem as well. Am just writing tests for this, currently.

tstoeckler’s picture

Status: Active » Needs review
FileSize
2.07 KB

Here's a tests-only patch.

Status: Needs review » Needs work

The last submitted patch, 2111013-4.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
2.82 KB

Nicely fails on the exact right assertions. Here's one with a fix. *crossing fingers*
(Not providing an interdiff, because it seems sort of pointless)

Gábor Hojtsy’s picture

Status: Needs review » Fixed
Issue tags: +D8MI, +language-config

Superb, thanks!

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

Anonymous’s picture

Issue summary: View changes

Added detailed steps to reproduce