in2code-de / ipandlanguageredirect

TYPO3 redirect - browserlanguage and ip-address based
GNU General Public License v3.0
14 stars 14 forks source link

[BUGFIX] Do not redirect user, after he manually switches from his correct language to another website translation #16

Closed koehnlein closed 5 years ago

koehnlein commented 5 years ago

I'm using your extension to detect browser language and redirect users to their correct website language, without showing the dialoge.

And I've detected the following misbehaviour:

In my opinion this should not happen and I created a patch to solve this: If a "redirect" is configured, the cookie is always set. Even if there is no redirect to do, because the user already visits the correct website translation.

If you accept this merge reqest, you need to minify the JavaScript yourself, because I did not know, which minifier with which settings you prefere. Or you let me know, how to do it for you.

PS: If you want to see my configuration, you can find it in this Gist

einpraegsam commented 5 years ago

There are two different possibilities for you to stop this behaviour (see FAQ section): 1) add a ?h=1 as get param to your language links 2) add a data-ipandlanguageredirect-action="disableRedirect" to the links