• Resolved brbrbr

    (@brbrbr)


    Hi,

    when using
    – Hide URL language information for default language
    – Add language information to all URL
    -setting the default language to be first in order

    the rewriterules become:

    [(.?.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]
    [tr/(.?.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]

    the first line matching the other ones as well.

    thus with a url like

    tr/blabla

    the pagename matches is ‘tr/blabla’ on the first rule and not
    ‘blabla’ on the second

    changing the order of the language and flushing the rules gives

    [tr/(.?.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]
    [(.?.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]

    and a correct working site

    http://ww.wp.xz.cn/extend/plugins/polylang/

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

    (@chouby)

    Thank you very much for the bug report and fix proposed. I will look at this. Rewrite rules are always difficult for me 😉

    Plugin Author Chouby

    (@chouby)

    I made some correction with the rewrite rules in the current development version. It would be very nice if you could test it before I release v0.7.1. You may need to go to the ‘permalink settings’ admin panel and just click on save changes for the new rules to be activated.

    Thread Starter brbrbr

    (@brbrbr)

    The order is now correct and the page is found properly,

    great

    I discovered that the issue was also resolved be getting wordpress into the ‘use_verbose_page_rules’ mode.

    ( The ‘use_verbose_page_rules’ object property will be set to true if the
    permalink structure begins with one of the following: ‘%postname%’, ‘%category%’, ‘%tag%’, or ‘%author%’.)

    then wordpress takes ALL rules into consideration even after a match.

    Plugin Author Chouby

    (@chouby)

    Thank you for the tip. I did not know this ‘use_verbose_page_rules’ property.

    Ready for 0.7.1 now.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Polylang] Rewrite rules not correct’ is closed to new replies.