WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] 404 everywhere (9 posts)

  1. mr_foto
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Did you create at least one post in each language?

  3. mr_foto
    Member
    Posted 1 year ago #

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

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  5. mr_foto
    Member
    Posted 1 year ago #

    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.

  6. mr_foto
    Member
    Posted 1 year ago #

    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.

  7. mr_foto
    Member
    Posted 1 year ago #

    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.

  8. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. mr_foto
    Member
    Posted 1 year ago #

    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 :P

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic