-
Notifications
You must be signed in to change notification settings - Fork 47
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
Language switch url gives Redirector error in content #15
Comments
I am having the same issue when I click on one of the language links after my session has expired. Also testing locally. |
Found out that this issue occurs if the session expires between the page visit and the language switch. This is where it tries to use $session-previousUrl() which returns null and that cannot be redirected. Added a patch that returns the user to home see #16 |
Having same problem. @drsdre solution works. Since it's not merged yet, what I did was created a new controller extending Copied methods Did @drsdre changes to the method Changed Working for now |
Sorry guys for the late reaction, this has been fixed now. |
Since using Laravel 5.8 I'm hitting on an error when I'm switching language using the language()->back($code) function. This error blocks in local (debug) mode, in production the route is followed.
ErrorException: Object of class Illuminate\Routing\Redirector could not be converted to string in file /project/vendor/symfony/http-foundation/Response.php on line 404
My language.php configuration:
'route' => true,
'home' => true,
'url' => false,
'carbon' => true,
'date' => false,
'auto' => true,
'prefix' => 'languages',
'middleware' => 'Akaunting\Language\Middleware\SetLocale',
'mode' => ['code' => 'short', 'name' => 'native'],
The text was updated successfully, but these errors were encountered: