Follow-up to #2650434: Clearing cache via UI in translated language resets config translation of field labels to default language

Problem/Motivation

$request variable is not used and setCurrentUser() call resets inside

Proposed resolution

Clean-up and fix doc block

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

andypost created an issue. See original summary.

andypost’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +documentation
FileSize
1.21 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2839396-2.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
andypost’s picture

This is a code clean-up

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
@@ -64,16 +64,14 @@ public function __construct(ConfigurableLanguageManagerInterface $language_manag
-      $this->negotiator->reset();

Are we sure that we can remove this - what about sub requests? Yes this obviously untested but removing it here seems wrong.

tstoeckler’s picture

Status: Needs work » Reviewed & tested by the community

Re @alexpott, the $this->negotiator->setCurrentUser($this->currentUser) just above that already does a reset, it does $this->reset() internally. So this really is just cleanup of dead code, no functional change.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Ah thanks @tstoeckler.

Committed 2d4af39 and pushed to 8.3.x. Thanks!

  • alexpott committed 2d4af39 on 8.3.x
    Issue #2839396 by andypost, tstoeckler: Clean-up unused variable and...

  • alexpott committed 2d4af39 on 8.4.x
    Issue #2839396 by andypost, tstoeckler: Clean-up unused variable and...

  • alexpott committed 2d4af39 on 8.4.x
    Issue #2839396 by andypost, tstoeckler: Clean-up unused variable and...

Status: Fixed » Closed (fixed)

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