Support » Plugin: Permalink Manager Lite » Multilingual slug gets stripped.

  • Resolved dimitrisunited

    (@dimitrisunited)


    Hi,

    We are having an issue with multilingual slugs that are being stripped after saving a post.

    For example the following:
    /el/αντιπαρος-δωματια/

    becomes:
    /el/μ/

    after pressing update post.

    I tried setting the following settings:

    – Strip special characters -> No, keep special characters (.,|_+) in the slugs
    – Convert accented letters -> No, keep accented letters in the slugs

    but nothing changed – the alias was being changed to /el/μ/ every time.

    Note 1: When i saved the slug from your URI editor it worked. The problem is when i save a page or a post. Same issue with quick edit.

    Note 2: I have the plugin auto-update enabled so i am not exactly sure when this happened but i am pretty sure a change introduced AFTER 2.2.9.2 is the problem because the plugin works fine after downgrading to 2.2.9.2 again.

    Note 3: Versions:
    Permalink Manager Lite: 2.2.9.6
    WordPress: 5.6.2
    PHP: 7.4

    Dimitris

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

    (@mbis)

    Hi @dimitrisunited,

    I apologize for the inconvenience. Could you try to check if the issue persists after you reinstall the plugin from the fresh copy?

    Best regards,
    Maciej

    Thread Starter dimitrisunited

    (@dimitrisunited)

    Hi @mbis,

    Thank you for the quick reply. It works.

    So the difference was in the file:
    permalink-manager-helper-functions.php

    the regex:

    
    $sanitize_regex = apply_filters("permalink_manager_sanitize_regex", "/[^\p{Xan}\p{Thai}a-zA-Z0-9{$percent_sign}\/_\.|+, -]/ui", $percent_sign);
    

    in this version you removed the \p{Thai} to become:

    
    $sanitize_regex = apply_filters("permalink_manager_sanitize_regex", "/[^\p{Xan}a-zA-Z0-9{$percent_sign}\/_\.|+, -]/ui", $percent_sign);
    

    Again, thank you for your time,
    Dimitris

    Plugin Author Maciej Bis

    (@mbis)

    Hi @dimitrisunited,

    Yes, I reverted this particular line of code. It caused different problems with string parsing in some specific PHP 7 versions.

    Best regards,
    Maciej

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.