Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link generated by wp_logout_url();, I am greeted with the WP die screen:

You are attempting to log out of SITE
Do you really want to log out?

What causes this to trigger at the first place?

Edit: Like I mentioned it was happening randomly, I think I figured out something. IT works fine with link generated by wp_logout_url(); but as soon as I use a $redirect parameter in wp_logout_url( $redirect );, I start facing the issue.

Any light on the matter?

share|improve this question
    
I'm having the exact same problem. Did you ever figure this out? –  SDP May 29 '12 at 21:09
    
@Emerson Nope! And didn't ran into again. I mean didn't have to use it after that. –  Ashfame May 30 '12 at 6:38
    
have you set an exit() after the redirect? –  kaiser Jun 19 '12 at 0:15
1  
@kaiser I wasn't manually redirecting here. Just letting the function know that it should redirect. I guess the function would be doing / is supposed to exit() after redirecting, but I didn't check the source when I had this issue. –  Ashfame Jun 19 '12 at 11:40
add comment

1 Answer

up vote 1 down vote accepted

This message is raised by wp_nonce_ays() which is called by check_admin_referer().

Your browser has probably not sent a referer header, so WordPress could not validate the nonce. This may be a problem in your browser settings or your network connection.

share|improve this answer
    
So its totally a hiccup and nothing else? –  Ashfame Jul 3 '12 at 5:19
    
Impossible to tell for sure without seeing it. But it seems to be random … you may sit behind a proxy that changes your request headers. –  toscho Jul 3 '12 at 5:22
    
Gotcha! Thanks. Upvoted! –  Ashfame Jul 3 '12 at 10:39
    
@Ashfame If my answer solved the problem (or even better: helped you to solve it) tick the little checkmark on the left side, so other readers know this is the solution they were looking for. –  toscho Oct 6 '12 at 22:41
    
I upvoted it earlier because your answer explains thing a bit but it didn't solve the issue at that time, so didn't accept it. –  Ashfame Oct 6 '12 at 23:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.