wp_logout_url() – WordPress Failure Notice

My wp_logout_url() is working right from the front end.

But when I change the new password from the front end, then, on the change password page, when I click on logout, the wp_logout_url() outputs

You are attempting to log out of (site name)

Do you really want to log out?

Here is a screen shot snippet
enter image description here

Any suggestions?

2 Answers
2

I have the exact same problem and can duplicate the behavior. It only happens when a password is successfully changed. If after a password change you navigate to a different page, all is well again. But clicking the logout link then invokes wp_logout_url() and I consistently get that error.

The error is also triggered if you provide a wrong nonce. So, that may be a clue. Seems like it is a WP core bug of some sort.

In my case the not so elegant work-around has been to force a redirect to a page that says “Your Password Has Been Changed” after a successful password change. The logout link will be well behaved again. This is a work-around, not a solution for the bug.

Leave a Comment