• Resolved paolofranzetti

    (@paolofranzetti)


    I use your pluging to give the italian pages of my site a /it/ prefix, i.e.

    mysite.com/pagename <=> mysite.com/it/pagename

    With the last update all the it slug become duplicated, i.e.

    mysite.com/it/it/pagename

    If I remove the it/ part from the permalink-manager name it gives me a duplicated permalink error.

    Thanks for any support you can give me

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @paolofranzetti,

    please remove the it/ from the permalink – you can ignore “duplicated permalink” error as long as the duplicated permalinks have different language prefixes.

    Best regards,
    Maciej

    Plugin Author Maciej Bis

    (@mbis)

    Alternatively you can remove the base using this code snippet:

    function pm_remove_lang_base($base) {
    	return str_replace('/it', '', $base);
    }
    add_filter('permalink_manager_filter_permalink_base', 'pm_remove_lang_base', 20);
    Thread Starter paolofranzetti

    (@paolofranzetti)

    Hi Maciej.

    If I use the first solution (remove the it/ from permalink) the english version redirects on the italian one.

    It I use the second solution (the code snippet) is the italian version that redirects on the english one.

    Kind regards,
    Paolo

    Plugin Author Maciej Bis

    (@mbis)

    Hi Paolo,

    could you send me the sample permalinks?

    Best regards,
    Maciej

    Thread Starter paolofranzetti

    (@paolofranzetti)

    Sorry Maciej,

    what do you mean by “the sample permalinks” ?

    Paolo

    Plugin Author Maciej Bis

    (@mbis)

    Hi Paolo,

    I mean the URL address that does not work correctly.

    Maciej

    Plugin Author Maciej Bis

    (@mbis)

    Could you also disable “Fix language mismatch” option in Permalink Manager settings?

    Thread Starter paolofranzetti

    (@paolofranzetti)

    I disabled the “Fix language mismatch” option; same behaviour.

    The website is in development and it is password protected; may I send you the login informations in some “private” way ?

    Thank you,
    Paolo

    Plugin Author Maciej Bis

    (@mbis)

    Hi Paolo,

    yes, of course – here is my email address:
    contact /at/ maciejbis.net

    Regards,
    Maciej

    Plugin Author Maciej Bis

    (@mbis)

    The issue is fixed, for whom it may concern:

    The language codes should be appended with Polylang if “The language is set from the directory name in pretty permalinks” mode is selected in Polylang settings.

    If you would like to use the same custom URI for different languages please also enable “Fix language mismatch” option in Permalink Manager settings.

    Best regards,
    Maciej

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Duplicated polylang slugs’ is closed to new replies.