• blankpoint

    (@blankpoint)


    A (big) bug has been introduced in 0.8.1 . My permalink structure is:

    /blog/%postname%/

    On the front page and any blog pages, the links displayed by pll_the_languages are now broken.

    The front page (https://www.example.com/), displayed in French default, SHOULD be linking to the English version of the page which is at https://www.example.com/en/ — this is what it did up until 0.8.1. But now it links to:
    https://www.example.com/blog//en/

    That throws a 404.

    Need an urgent fix for this. I’ve tried the different settings in Polylang’s admin. The links do work properly if I switch my structure to just /%postname%/ but I need the /blog/ prefix in this case.

    Downgrading to 0.8 fixes the problem.

    https://www.ads-software.com/extend/plugins/polylang/

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

    (@chouby)

    I made some changes in permalink structure handling for WP 3.4 compatibility and did something wrong with all permalink structures which use a front ??
    Please update to the dev version.

    Thread Starter blankpoint

    (@blankpoint)

    Thanks for letting me know. Would prefer to stick with the “official” releases. I assume the fix will be in the next proper version? Is 3.4 changing permalink handling or what? I can’t find any reference to that.

    Plugin Author Chouby

    (@chouby)

    WP 3.4 will changes some things internally. It will not change anything for users or even in API, but Polylang used directly the internal structure. I changed this in 0.8.1 but made a mistake…

    Thread Starter blankpoint

    (@blankpoint)

    The error exists in a slightly different form in 0.8.3.

    Permalink structure is /blog/%postname%/

    Using pll_the_languages, the language switch works on all pages EXCEPT FOR THE FRONT PAGE. The front page, say in default language (French in my case, but I have default language info hidden in URLs), is https://www.example.com .

    When I click the link to switch to English, I get https://www.example.com/blog/en/ , which throws a 404. The correct link for the home page should be https://www.example.com/en/ . When I manually go to this URL, it does show the homepage in English.

    In case it matters, my home page shows most recent posts.

    Thread Starter blankpoint

    (@blankpoint)

    By the way, 0.8 does correctly link to https://www.example.com/en/

    Plugin Author Chouby

    (@chouby)

    I have no such issue in 0.8.3 on my test site. The link should not include /blog/.

    Thread Starter blankpoint

    (@blankpoint)

    I’ve tried a bunch of different things, but no matter what, when I upgrade to 0.8.3, this bug keeps returning. Could it be because I am going from 0.8 straight to 0.8.3. I had the buggy intermediate versions installed, but reverted back to 0.8. Maybe the bug only manifests that way?

    Anyway, do you have any suggestion for getting things working normally? I would delete the plugin and its tables completely and start from scratch, but I have a lot of custom strings defined already, and so I’m not keen to do that.

    +1 for putting custom string management into the gui.

    Thanks.

    Plugin Author Chouby

    (@chouby)

    I am really sorry. For weeks now I am doing all my tests with the development version of WordPress 3.4. I remade tests with 3.3 and finally did reproduce the bug. I did not pay attention that the function I am using to do this had changed with 3.4 (and I used the structure only compatible with 3.4 ?? ). So you can correct it yourself in 0.8.3 by replacing the line 307 in polylang.php :

    add_permastruct('language', $options['rewrite'] ? '%language%' : 'language/%language%', array('with_front' => false));

    by

    add_permastruct('language', $options['rewrite'] ? '%language%' : 'language/%language%', false);

    Or download the current development version. Or just wait for 0.8.4 which will correct this together with a few other bugs.

    Thread Starter blankpoint

    (@blankpoint)

    Thanks, Chouby. I’m relieved that the bug has been caught. I’ll hold off and stay with 0.8 until you release 0.8.4. Hope that’s coming soon.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Polylang] link to non-default language blog pages broken when using slug base in permalink’ is closed to new replies.