_locale=en redirects too many issues
Created 4 years ago by geezombie

If 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)

geezombie  —  4 years ago

To solve this issue, I have replaced the line with the following return redirect($request->url());

ryanthompson  —  4 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!