• Hi,

    I just upgraded a old WordPress site (3.4.1) to 4.1, which made the English frontpage unavailable. Old other pages works fine.

    Setup:
    Languages:
    – Danish (Default)
    – English

    When I browse the English frontpage (/en), I just get the default index.php, which seems to match a taxonomy page: “Languages”.

    Any ideas what could be wrong ?

    Regards,
    Mark

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter kirkov

    (@kirkov)

    Also, I’m using static frontpage.

    Plugin Author Chouby

    (@chouby)

    Hi!

    You must take care that your static front page is translated in all languages and taht translations are correctly linked together.

    Thread Starter kirkov

    (@kirkov)

    Thanks for your answer.

    They are both translated and linked together. Are there any other things I can check?

    Or maybe point me to where the lookup are in the plugin code, and I can investigate?

    Thanks,
    Mark

    Thread Starter kirkov

    (@kirkov)

    Alright, found out where it went wrong:

    In the file: /frontend/choose-lang.php

    if ($this->options['redirect_lang'] && is_tax('language') && $this->page_on_front && <strong>(count($query->query) == 1</strong> || (is_paged() && count($query->query) == 2))) {

    The $query->query contains the following entries:

    array(2) {
      ["page_id"]=>
      string(3) "en/"
      ["lang"]=>
      string(2) "en"
    }

    So count($query->query) will return 2.

    If I change it to: (count($query->query) == 2, the English frontpage shows just fine.

    So my questions is: Why ensure count($query->query) equals 1 ?

    Regards,
    Mark

    Plugin Author Chouby

    (@chouby)

    What is the slug of your English front page? ‘en’? If yes, please change it as the slug is already used by the language.

    Thread Starter kirkov

    (@kirkov)

    The English front page slug is “home”.

    Slug in editor image

    Thread Starter kirkov

    (@kirkov)

    The issues does not appear in the production environment.

    Which is strange, because my development environment is an exact copy of the production.

    So unless you want to look further into the issue, I’ll mark this as resolved.

    Plugin Author Chouby

    (@chouby)

    page_id = 'en/' makes me think that something was wrong in your rewrite rules (But I have no idea why) and resaving Polylang settings may help. Glad to read that’s ok in your production site.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘English frontpage just shows Languages taxonomy page’ is closed to new replies.