• Resolved kennethykw

    (@kennethykw)


    Hi Support,

    I have translate my website to multiple language by translatepress. While I am trying to change the another language and login. The page does not direct to the page after login. It shows the same page without login and the URL shows https://www.lovedating.love/zh/#TRPLINKPROCESSED. I cant fix this issue. Would you please advise the way to solve this issue?

    Thanks,
    Kenneth

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Dragos

    (@dragosvrejiu)

    Hello Kenneth,

    Do you still encounter this issue?

    I was able to change the language normally , without being redirected to https://www.lovedating.love/zh/#TRPLINKPROCESSED.

    Best wishes,

    Thread Starter kennethykw

    (@kennethykw)

    Hello,

    Thanks for your message.
    Yes. I can switch the language. But when I login in zh, the URL Wwill direct to https://www.lovedating.love/zh/#TRPLINKPROCESSED. I cannot login in zh. You may try to use any user name to login.

    Thanks.

    Dragos

    (@dragosvrejiu)

    Hello again,

    WP doesn’t accept to insert tags into the post links.
    You can create a mini plugin with which you can ignore the desired link.

    Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
    Add the following code to the end of it:

    /*
    * Don’t add the language slug in a custom added link.
    * This function prevents custom added URLs from being processed when the Force Language in Custom Links option is set to Yes
    *
    * This does not prevent the page from showing the language switcher.
    * It also does not prevent the translation of the page.
    */

    add_filter( ‘trp_force_custom_links’, ‘trpc_ignore_url’, 10, 4 );
    function trpc_ignore_url( $translated_url, $url, $language, $a_href ){
    $link_to_ignore = “https://www.example.com/enchanced”; // url to ignore.
    if ( strpos( $url, $link_to_ignore) !== false ){
    return $url;
    }
    return $translated_url;
    }

    Edit $link_to_ignore = “https://www.example.com/enchanced”; with your desired link address (without language slug in it).

    Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality.

    With the best wishes,

    Thread Starter kennethykw

    (@kennethykw)

    Hello,

    I have tried your suggestion but it is still not work. The URL still prompts while login in zh page. Is there any way to disable the link to ignore function?

    Thanks,

    Dragos

    (@dragosvrejiu)

    Hello,

    Could you please send me a link to the plugin you are using ?

    I will try to replicate your issue with the login page on my local instance and get back to you with an answer.

    Best regards,

    Thread Starter kennethykw

    (@kennethykw)

    This is the link of the translatepress version 1.6.5 of the plugin.

    https://www.ads-software.com/plugins/translatepress-multilingual/

    And this is the script I used to trying your method,

    add_filter( ‘trp_force_custom_links’, ‘trpc_ignore_url’, 10, 4 );
    function trpc_ignore_url( $translated_url, $url, $language, $a_href ){
    $link_to_ignore = “https://www.lovedating.love/#TRPLINKPROCESSED”; // url to ignore.
    if ( strpos( $url, $link_to_ignore) !== false ){
    return $url;
    }
    return $translated_url;
    }
    ?>

    Can I send an private message to you for the account you can try to login to my admin portal?

    Thanks,
    Kenneth

    Dragos

    (@dragosvrejiu)

    Hi Kenneth,

    Could you please change $link_to_ignore so it will be $link_to_ignore=“https://www.lovedating.love/#TRPLINKPROCESSED”;

    There is a mistake in what I’ve sent you above, it appeared encoded.

    If this doesn’t change anything, could you please send me a link to the plugin you are using for login forms?

    I will try to replicate this issue on my local machine.

    Let me know.

    Best wishes,

    • This reply was modified 5 years, 1 month ago by Dragos.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘#TRPLINKPROCESSED’ is closed to new replies.