- Issue created by @pingwin_cracow
Fatal error when trying to change default language from en to another.
After installing Droopler 5.1.0 - WITHOUT DEMONSTRATION CONTENT
- installs an additional language, in this case pl.
1 - Change the language settings of the home page /welcome to pl.
2 - Change the Content page settings to pl so that subsequent pages are created in pl by default.
3 - Set the pl language in the language order first (pl below en).
Up to this point everything works fine and displays content indicating pl.
4 - Set the pl language as default and get a fatal error:
The website encountered an unexpected error. Try again later.
Error: Call to a member function getRequestUri() on null in Drupal\locale\LocaleLookup->resolveCacheMiss() (line 157 of core/modules/locale/src/LocaleLookup.php).
Drupal\locale\LocaleLookup->resolveCacheMiss() (Line: 148)
Drupal\Core\Cache\CacheCollector->get() (Line: 121)
Drupal\locale\LocaleTranslation->getStringTranslation() (Line: 92)
Drupal\Core\StringTranslation\TranslationManager->getStringTranslation() (Line: 140)
Drupal\Core\StringTranslation\TranslationManager->doTranslate() (Line: 112)
Drupal\Core\StringTranslation\TranslationManager->translateString() (Line: 190)
Drupal\Core\StringTranslation\TranslatableMarkup->render() (Line: 15)
Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
strpos() (Line: 16)
Drupal\Core\Logger\LogMessageParser->parseMessagePlaceholders() (Line: 61)
Drupal\dblog\Logger\DbLog->log() (Line: 127)
Drupal\Core\Logger\LoggerChannel->log() (Line: 50)
Drupal\Core\Logger\LoggerChannel->error() (Line: 57)
Drupal\ludwig\RequireOnce->requireOnce() (Line: 11)
include_once() (Line: 153)
Drupal\Core\Extension\Extension->load() (Line: 104)
Drupal\Core\Extension\ModuleHandler->load() (Line: 117)
Drupal\Core\Extension\ModuleHandler->loadAll() (Line: 586)
Drupal\Core\DrupalKernel->preHandle() (Line: 46)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
In the case of installations with demo pages, this error does not occur, even after removing the en language and setting the demo pages to the default pl. The Content page content type automatically detects and sets the default language of the site to pl.
I have tested different versions of installation and configuration of language change settings and every time I get the same fatal error when setting a language other than en as default.
Active
5.1
Code