• Resolved Nguyen Le

    (@nguyenrom)


    Dear Maciej,

    I see a bug when using Permalink Manager (PM) with Translatepress (TP). PM auto add slug to native lang url.

    Ex:
    http://abc.com/itemn -> PM -> http://abc.com/vi/itemn

    I have not use another multilang plugins so I don’t know it happens with them plugins.

    Thank you so much,
    Nguyen

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

    (@mbis)

    Hi Nguyen,

    I apologize for the inconvenience. It looks like TranslatePress developers changed their codebase a bit.

    Could you manually replace the below line of code (#330):
    https://plugins.trac.wordpress.org/browser/permalink-manager/trunk/includes/core/permalink-manager-language-plugins.php#L330

    $hide_prefix_for_default_lang = ((isset($sitepress_settings['urls']['directory_for_default_language']) && $sitepress_settings['urls']['directory_for_default_language'] != 1) || !empty($polylang->links_model->options['hide_default']) || (!empty($translate_press_settings) && empty($translate_press_settings['add-subdirectory-to-default-language']))) ? true : false;

    with:
    $hide_prefix_for_default_lang = ((isset($sitepress_settings['urls']['directory_for_default_language']) && $sitepress_settings['urls']['directory_for_default_language'] != 1) || !empty($polylang->links_model->options['hide_default']) || (!empty($translate_press_settings) && $translate_press_settings['add-subdirectory-to-default-language'] !== 'yes')) ? true : false;

    Best regards,
    Maciej

    Thread Starter Nguyen Le

    (@nguyenrom)

    Thank @mbis so much, It’s working. 😀

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

The topic ‘Permalink Manager auto add slug to native lang url when I use Translatepress’ is closed to new replies.