• Resolved widescreen

    (@widescreen)


    Hi, nice plugin! Thanks
    I just updated to the new version.

    Problem: a lot of permalinks are updating like
    mysite.com/en/en/myslug/posttitle (prefix /en/ is now doubled)
    mysite.com/fr/fr/myslug/posttitle (prefix /fr/ is now doubled)

    Do I have manually change them in the Permalink Manager?
    Regenerate button gives me memory error: I have over 6000 posts!

    Thanks for your support

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter widescreen

    (@widescreen)

    I see there is a new version with a multilingual hotfix. Probably it addresses my issue also…

    I propose my solution for anybody who needs it. It is sure not the right way, but it worked for me:

    1) go in WP DataBase, table:wp_options [DO A BaCK UP!]

    1 bis) Make sure you have that BACKUP!!!

    2) look for option_name: permalink-manager-uris
    3) click edit
    4) copy all the option_value (it can be quite big)
    5) copy in a text editor (i.e word, notepad++ etc)
    6) perform a find and replace (en/mysglug -> replace with myslug)
    7) go back to the the DB copy the new text in the permalink-manager-uris option_value
    8) save
    9) go to worpress Permalink Manager
    10) go in the URi editor tool
    11) click on update all URi below (hopefully you don’t have many pages to update)

    So, it’s solved for me. Thanks

    Plugin Author Maciej Bis

    (@mbis)

    Thank you @widescreen.

    The old versions of my plugin did not support Polylang before and I guess that this is the source of the problem.

    There is a better & faster way to fix this issue. Backup is still recommended, but the duplicated language prefixes can be removed with “Find & Replace” tool available in Permalink Manager Tools:
    wp-admin/tools.php?page=permalink-manager&section=tools&subsection=find_and_replace

    I added a support for REGEX (regular expressions) and to get rid off the prefixes you should:

    • type /^en/(.*)$/ formula into “Find …” field:
    • type: $1 insude “Replace with …” field
    • select “Custom URIs” in “Mode
    • select post types below where the change should be applied
    • click on “Find and replace”

    Regards,
    Maciej

    • This reply was modified 6 years, 11 months ago by Maciej Bis.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Doubled /en/ prefix with Polylang’ is closed to new replies.