Find a way to set language context without creating user.

Code need to be updated:

  $user_config_context = config_context_enter('Drupal\user\UserConfigContext');
  $account = new User(array('langcode' => $language->langcode), 'user');
  $user_config_context->setAccount($account);

see #1970534-6: Patch testing issue

Files: 
CommentFileSizeAuthor
#1 20202347-context-change-1.patch936 bytesvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 20202347-context-change-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Title:Update config_translation_enter_context with language context instead of creating User.Update config_translation_enter_context with User entity instead of context instead of creating User object
Status:Active» Needs review
StatusFileSize
new936 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 20202347-context-change-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Checked few context related meta and tried adding LanguageConfigcontext. But doesn't look we would get it any time soon. So updating another option that fix saving context for now.

Once LanguagConfigContext landed, we can replace this.

Title:Update config_translation_enter_context with User entity instead of context instead of creating User objectTemporary fix for config_translation_enter_context until language context becomes an option
Status:Needs review» Fixed

Very tricky and clever hack :D Thanks, committed. We should really get #2020361: Create LanguageConfigContext to activate configuration overrides based on language land and remove this hack though :) Other modules reacting to a user context may react to this user in ways we did not intend. It will work temporarily in the meantime until then.

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

adding pointer to helper issue.