qTranslate auto redirection doesn't work for a single post

544 views Asked by At

Default language for my web site is Ru. Detect Browser Language is turned ON

When a user with En language specified by his browser goes to my web site front page http://ivangrigoryev.com it automaticly redirects him to /?lang=en.

But when user goes to a single post, for example, via FB or typing the url directly e.g http://ivangrigoryev.com/one-plus-one-review/ redirection doesn't occure.

I've checked for plugin conflicts - nothing at all. WordPress version 3.5.1 qTranslate version 2.5.34

Any suggestions?

2

There are 2 answers

0
user3295091 On BEST ANSWER

To solve this issue I've replaced line 71 in qtranslate_core.php

    setcookie('qtrans_cookie_test', 'qTranslate Cookie Test', 0, $q_config['url_info']['home'], $q_config['url_info']['host']);

by

    setcookie('qtrans_cookie_test', 'qTranslate Cookie Test', 0, $_SERVER['REQUEST_URI'], $q_config['url_info']['host']);
0
Rich On

Try re-saving your permalinks, if that does not work then I would install mqTranslate instead, its a fork of qTranslate (which is no longer actively supported) https://wordpress.org/plugins/mqtranslate/

Lots of bugs have been fixed and its a big improvement, the best part is that it is completely compatible with qTranslate so you will not loose any of your settings or translations.