WordPress.org

Support

Support » Plugins and Hacks » Sexy Login » [Resolved] how to fix logout issue

[Resolved] how to fix logout issue

Viewing 7 replies - 1 through 7 (of 7 total)
  • sorry correction when i log out on an article the address looks like this

    http://example.com/blog2013/article
    so is not not putting a slash in between blog and the year

    Plugin Author OptimalDevs

    @optimaldevs

    Hi jason102178.

    We are trying to reproduce the same issue but we can’t, the plugin is working as expected.

    Please tell us if you are using SSL logins and the custom structure links in your WordPress ( Settings -> Permalinks -> Custom Structure, something like this: /%year%/%monthnum%/%postname%/).

    In advance, you can fix temporaly this issue editing the sexy-login-widget.php file in the plugin root. Localize the line 46 and replace:

    wp_logout_url( sexy_login_current_url() )

    with:

    wp_logout_url( site_url(‘/’) )

    Thanks for the feedback, and sorry for the mistake.

    Hi

    Yes and yes to both, yeah i am using ssl and yeah i am using custom permalinks,. this is my current permalink structure
    /%year%/%postname%/

    and the fix you gave me works, however i was wondering by using this temporary fix, is it suppose to redirect you

    for example if i am on example.com/blog/article, it will redirect me back to the main homepage example.com/blog

    i personally thought that when you click logout if you were on an article page it would remain on that page and not redirect back to the main part of the blog

    Plugin Author OptimalDevs

    @optimaldevs

    We have tested your custom structure and ssl logouts but all works fine. Probably the missing of a slash it’s caused by some bad configuration in the .htaccess file or by other plugin. We really don’t know. If the “sexy_login_current_url()” function is failing, you must have the same issue when a user logging on a topic.

    A new version of Sexy Login is coming, and we will take a careful look into this part.

    The final fix for your special problem must be replace:

    wp_logout_url( site_url(‘/’) )

    with:

    wp_logout_url( $_SERVER[‘REQUEST_URI’] )

    And if the problem persist, replace with:

    wp_logout_url( ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/’ . $_SERVER[‘REQUEST_URI’] )

    Thanks again, waiting for your response.

    Thank you so much you have been very very helpful the final solution you provided to me worked perfect
    wp_logout_url( $_SERVER[‘REQUEST_URI’] )

    now if user logs out they remain on the same page without being redirected…

    you mentioned you tested the custom structure and ssl and all works fine, and that the missing slash could be caused by some bad configuration in .htaccess , is this something i should be concerned with or take a look into trying to fix, i didnt know if it was going to hurt anything or not

    Plugin Author OptimalDevs

    @optimaldevs

    We’re glad we were able to help.

    Don’t worry about the .htaccess file if it’s all works right. WordPress can be disconcerting sometimes. Check your WordPress Address and Site Address in “Settings -> General” and make sure they are correct. That’s all.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] how to fix logout issue’ is closed to new replies.
Skip to toolbar