Support » Plugin: Polylang » 404 everywhere

  • Resolved mr_foto


    I have a new blog with a newly installed Polylang 0.9.8 but I was getting 404 – page not found and wrong links on flags (without current page in that language, but just to frontpage) no matter which template I chose. So I upgraded to 1dev and the problem persists. Nothing works unless I select the default permalinks (?p=123). There are no other plugins and it doesn’t deppend on theme – tried the ones that came with WP.

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


    Did you create at least one post in each language?

    Yes, there are 2 posts (1 in each language). And lots of pages in both languages. The site is if that helps anyhow.

    Plugin Author Chouby


    So currently, it seems to work correctly with the default permalinks. What was the permalinks setting you tried and which did not work? What were your Polylang settings?

    I’ve tried all the permalinks settings and nothing worked. I have the default settings. If you have time I could mail you username and pass.

    Wow, I’ve made an interesting discovery. If I change the theme to Twenty Twelve it still doesn’t work BUT if I then also go to permalinks settings and just press save changes it starts to work. But that only happens on the default theme. As soon as I change the theme back to Filtered it stops working again.

    Ha! Found the little bugger. In the Filtered theme there is a line after adding custom posts:
    flush_rewrite_rules( false );

    After I commented out that line, everything started to work perfectly. Might be some help to you since maybe some other theme/plugin is doing the same and so destroying your rewrite rules somehow.

    Plugin Author Chouby


    I am glad you found the solution.

    Some plugins and themes do call this function at every page load. It is very bad practice as:
    1. it is likely to break something if the call is made very soon in process (it will break Polylang if it is called before the ‘wp_loaded’ is fired).
    2. it is a very expensive function and thus should be used as less as possible.

    Yup, I’ve just wrote to the theme developers. I hope they fix it since there might be other plugins that this breaks besides the wordpress itself 😛

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘404 everywhere’ is closed to new replies.