mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 23:39:58 +01:00
fix session_store_active functionality
At the moment and since 1.7.19, the `system.languages.session_store_active`
setting has no effect.
Session must be initialized before URI for `$language->setActiveFromUri($uri)`
(called from `$this->initializeUri($config) -> $uri->init()`) to
properly retrieve / store `active_language` in Session.
This was previously detected in #3269 as per the code comment, but got
reversed in 2e9fe80e33.
This commit is contained in:
committed by
Matias Griese
parent
33a5709903
commit
08d7ad80df
@@ -105,12 +105,12 @@ class InitializeProcessor extends ProcessorBase
|
||||
// TODO: remove in 2.0.
|
||||
$this->container['accounts'];
|
||||
|
||||
// Initialize session (used by URI, see issue #3269).
|
||||
$this->initializeSession($config);
|
||||
|
||||
// Initialize URI (uses session, see issue #3269).
|
||||
$this->initializeUri($config);
|
||||
|
||||
// Initialize session.
|
||||
$this->initializeSession($config);
|
||||
|
||||
// Grav may return redirect response right away.
|
||||
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
|
||||
if ($redirectCode) {
|
||||
|
||||
Reference in New Issue
Block a user