• Resolved webanwendung24

    (@webanwendung24)


    Hello,
    I am using Clean Login with the latest WPML.
    But there is a strange behavior:
    When I’m on the login page und submitting the login form with wrong data (or empty) i always get redirect to my login page with these parameters:
    “?lang=it#038;authentication=failed”.
    It doesn’t matter which my selected language was. It always changes to italian. The posts that contains the shortcode are set as “duplicate” from the base language post. If not, the language parameter isn’t send to the url and the language after submitting is always the default one.

    i already updated the posts/page and i am using clean permalinks.

    thank you in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • I tested too, it does not work well!

    I also have the same problem. Does not consider the selected language

    Plugin Author Alberto Hornero

    (@hornero)

    You only need to re-save (update) the post/page which contains the shortcode (for the main language)

    I hope this solves the problem.

    Regards,

    Alberto.

    Thread Starter webanwendung24

    (@webanwendung24)

    Hello,
    thank you for your reply.

    But i wrote “i already updated the posts/page and i am using clean permalinks.”, so it doesn’t work.

    It should not jump to my main language, instead it should keep the selected language.
    It always jumps to the language that was the last saved one.

    Any ideas? Thanks in advance

    Thread Starter webanwendung24

    (@webanwendung24)

    Okay… I found a work around.
    I hope that this will help others with similar problems:

    Navigate to your plugin folger und search for clean-login/clean-login.php.
    Go to line 232 and replace the code:

    // Sets the redirect url to the current page
    $url = clean_login_url_cleaner( wp_get_referer() );
    $lang = $_COOKIE[‘_icl_current_language’];
    if(!empty($lang)){
    $url = add_query_arg(‘lang’, $lang, $url);
    }

    Then search directly after that this code snippet:
    $url = get_option( ‘cl_login_url’, ”);
    And remove it or just use
    //$url = get_option( ‘cl_login_url’, ”);

    After that, go to clean-login/content/login-form.php
    Change line 2 and 3 to:
    $register_url = get_option( ‘cl_register_url’,”).’?lang=’.$_COOKIE[‘_icl_current_language’];
    $restore_url = get_option( ‘cl_restore_url’, ”).’?lang=’.$_COOKIE[‘_icl_current_language’];

    The first code snippet passes the current selected language to all links.
    The second code fixes the lost password and register link.

    Please note: This works in my case. Maybe you have to go deeper into the plugin script and maybe some of the default features will not work correctly.
    I hope the plugin author will take note of this approach to make his tool more useful in combination with wpml.

    The esc_url function in combination with add_query_arg causes some trouble too.

    Best wishes

    Plugin Author Alberto Hornero

    (@hornero)

    Hi everybody,

    Thanks to another user contribution next release will support this feature.

    The way it’s something different as your proposal, but in any case thanks. I’m going also to include your support in the changelog ??

    Alberto.

    Plugin Author Alberto Hornero

    (@hornero)

    Plugin updated with all those changes. I hope you enjoy ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Login-Link is broken with WPML’ is closed to new replies.