Support » Fixing WordPress » BUG: You are attempting to log out of error in Carrington

Viewing 11 replies - 1 through 11 (of 11 total)
  • kurtiskronk


    I have noticed this exact same thing. You have to go to the Site Admin area in order to Log Out. Very weird.

    In the admin panel, this is what the Log Out button links to:

    On the normal blog pages, it just links to:

    Derek Herman


    I’m not familiar with the theme, but if you remove the old code for log outs and replace it with this. You will get a link to log out that works in 2.7 and before.

    <?php wp_loginout(); ?>

    Pretty simple, yeah?

    <?php wp_loginout(); ?> doesn’t seem to fit in with the way the theme has been coded.

    The following is the current theme code in an if statement:
    href=”‘ . site_url(‘wp-login.php?action=logout’, ‘login’) . ‘”>’ . __(‘Log Out’, ‘carrington’) . ‘

    Does anyone have an more suggestions? I really need this link to work.


    I used code from an updated version at

    Basically I replaced the WP version code:

    <?php wp_list_pages(‘title_li=’); ?>
    <?php global $user_ID;
    if($user_ID) {
    echo ‘<li class=”secondary”>< href=”‘ . site_url(‘wp-login.php?action=logout’, ‘login’) . ‘”>’ . __(‘Log Out’, ‘carrington’) . ‘</>’;
    } else {
    echo ‘<li class=”secondary”></>< href=”‘ . site_url(‘wp-login.php’, ‘login’) . ‘”>’ . __(‘Log In’, ‘carrington’) . ‘</>’;
    <?php wp_register(‘<li class=”secondary”>’, ”); ?>


    <?php wp_list_pages(‘title_li=’); ?>
    <li class=”secondary”><?php wp_loginout(); ?>
    <?php wp_register(‘<li class=”secondary”>’, ”); ?>

    Everything works great now!

    The bug was caused by a change about Log out mechanism with was reffered in

    which said:

    Logout from Site

    The Template Tag wp_logout_url was added in Version 2.7 to provide a nonced URL for logout purposes. If a theme uses a construct such as /wp-login.php?action=logout to offer the user a logout link that code should be updated to use the wp_logout_url. A good example of the usage of wp_logout_url can be seen in the WordPress Default and Classic themes comments.php and comments-popup.php Templates.

    Users will experience a You are attempting to log out of Please try again. message if the theme does not use wp_logout_url for the logout URL.

    So just find one line in your current theme files

    <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out</a>

    and replaced these codes with

    <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out</a>

    You can try log out again, and no same bug occurs again.

    I fixed this problem by using the method suggested by kurtiskronk. I opened up the “header-default.php” file in the “Header” folder, and replaced the line wp-login.php?action=logout with wp-login.php?action=logout&_wpnonce=6baa6d3b28.

    Now it works for me! Give it a try!

    pastormatt: doing that didn’t actually fix it for me, i was just pointing out a difference in URLs. weird that it fixed it for you.

    fishingfool’s suggestion did end up working for me, FYI

    This is fixed in the 2.0 beta, and (upcoming) full release.

    I don’ use the Carrington Theme. I’ve made a custom one.
    But I have the same problems. Any other ideas to solve this?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    If you’re getting this error, then you need to find the link in your theme that goes to wp-login.php?action=logout and replace it with <?php echo wp_logout_url(); ?>.

    More info:

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘BUG: You are attempting to log out of error in Carrington’ is closed to new replies.