Support » Plugin: Polylang » Failing to redirect properly after update.

  • Ayman



    After updating polylang to version 1.4.4, the home page keeps on crashing for the non default language.

    The url is resulting like: instead of

    1- Static home page
    2- Permalink structure settings: /%postname%
    3- Polylang settings:
    – The language is set from the directory name in pretty permalinks
    – Hide URL language information for default language
    – Remove /language/ in pretty permalinks
    – The front page url contains the language code instead of the page name or page id
    – When the front page is visited, set the language according to the browser preference

    Please note the only way to make it work again is to change from:
    - The language is set from the directory name in pretty permalinks
    The language is set from content

    But at this point the language code is lost. So, any Idea or suggestion on how to fix this out and bring the old behavior back would be very much appreciated.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Chouby


    Could you just try to resave your polylang settings?



    Already tried to re-save polylang settings and resave the permalink settings and nothing changed.
    I have also tried with the default theme and that didn’t help.
    Any other suggestions?

    Plugin Author Chouby


    Do you remember what was the previous version?

    Try to de-activate all other plugins and switch to a default theme such as twenty twelve.



    Previous version used is 1.4.3

    Already tried deactivating all the plugins used leaving only Polylang with the default theme Twenty Fourteen. Still the same behavior.

    Plugin Author Chouby


    I finally reproduced. v1.4.4 is correct with the permalink structure /%postname%/ but not with /%postname%

    Could you edit the file polylang/frontend/choose-lang-url.php at line 89 just below

    // the language is not correctly set so let's redirect to the correct url for this object

    and replace

    if (!empty($language)) {


    if (!empty($language) && (empty($this->curlang) || $language->slug != $this->curlang->slug)) {

    I believe it should fix the issue.

    Same problem here.
    Going to try to the fix.


    Fixed. Thank you.

    Plugin Author Chouby


    Well. This is only a quick fix (revert line from 1.4.4 to 1.4.3) but cannot be a definitive solution as it re-introduces another bug of the previous version.

    So I further worked on it and hopefully came to a better fix. Could you test the development version (



    @chouby, I will try the development version and let you know.

    It fixes it almost.
    When having the URL language information for default language not hidden, it still takes the homepage of the default language to
    Any ideas?

    Plugin Author Chouby


    @chantal C
    Do you mean that it works if you hide the language code for the default language and not if it is not hidden? Are you using the development version?

    Could you precise your permalinks settings and your Polylang settings?

    That’s correct. It works when the language code is hidden for the default language (
    As soon as I turn on the language code, it fails ( turns into
    My second and third language installed work perfectly now.

    My permalinks are: /%year%/%monthnum%/%postname%/
    But is also occurs when it’s just: /%postname%/

    I use the development version.

    Hope this helps.

    Plugin Author Chouby


    I can’t reproduce with the development version.

    Could you precise your Polylang settings?
    Are you using a static front page?
    Could you provide a link?

    Moreover, there is something strange as the initial issue was only for sites with no trailing slash in permalinks.

    Did you resave your Polylang settings?

    Items checked on the polylang settings:

    Also checked: Custom post types, Custom taxonomies and Synchronization.

    I am using a static homepage.

    Resaving my Polylang setting did the trick! Thanks!!


Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Failing to redirect properly after update.’ is closed to new replies.