-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session storage of locale broken in Laravel 5 #173
Comments
For me, this won't fix the bug: either I'm missing something, either locale Session is always set back to default. I mean, I just access the project with a localized URL, and then check the session (all OK). Then I access a non localized URL, and locale is set back to default. Reason is what I mentioned in the bug report: Session value is checked (and set) by LaravelLocalization before the Laravel Middleware which inialize the Session object. |
Can you show me an example of a non-working config file? I tested it with the latest version (1.0.5) and the session is loaded perfectly. |
Of course, here's my config:
Here's my L5 Http/Kernel file:
Thing is: I can reproduce it very easily, and when I'm tracing Session "locale" value it's quite clear: it's well set, but next un-localized request will set it back to default because |
I'm a bit lost... I think I might have done something wrong, because it seems that nobody else is experiencing this bug, which is, to me, very obvious. I think everything come form routes.php file, with the groupe prefix:
This If it's from me and I'm missing something obvious, please tell me! Thanks. |
+1 |
The Session value is checked by the LaravelLocalization class BEFORE the Laravel Middleware
Illuminate\Session\Middleware\StartSession
, which actually initialize le session object, depending on the driver.This means "locale" is always set back to the default, in every request, by LaravelLocalization (because at this point Session is empty).
The text was updated successfully, but these errors were encountered: