You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @malio10AC, I think i found a bug in your code.
In the method getRedirectResponseIfCookieIsSet:
$iIdLang = (int) $requestLanguage;
This way $iIdLang would always have the value "1" because $requestLanguage is an array.
I also think $requestLanguage is the wrong array to use here because you want to check if the page is available in the preferred language (set in the cookie), not in the requested language.
Hi. I have added a check to the file Classes/Middleware/RedirectionMiddleware.php
and these lines in the methods getRedirectResponseByBrowserLanguage before
$uri = $site->getRouter()->generateUri(...
and these lines in method getRedirectResponseIfCookieIsSet before
$uri = $site->getRouter()->generateUri(
I hope you can use that (or something similar) for upcoming versions because I don't want to merge the code after every update.
Thanks and have a nice day.
The text was updated successfully, but these errors were encountered: