_locale=en redirects too many issues
Created 5 years ago by geezombieIf I want to land users on specific version of my website using ?_locale=en then I get a too many redirects error.
I figured this was happening because on SetLocale.php line no 100, it is redirecting back.
I tried this out on official pyrocms.com site, goto following URL, you will be randomly redirected to different page instead of homepage, or in some cases get a too many redirects error
https://pyrocms.com/?_locale=en
Goto this URL on incognito mode or a different browser, (otherwise you will be redirect back to this page)
ryanthompson
—
5 years ago
Yes, the idea is to redirect to the existing page. I'll do some sniffing around on this cause we definitely don't want to break down if we have no back to return to. Thanks!
To solve this issue, I have replaced the line with the following
return redirect($request->url());