0

Admin or normal user can not logout using www.myswebsite.com/user/logout

An access denied page is displayed and the user is still logged.

using ?q=user/logout works.

It is not a rewrite problem, all other url are ok.

I have cleared the cache and deleted the cookies, tried on FF, IE & Chrome.

Any idea to investigate ?

closed as too broad by kiamlaluno Mar 28 '15 at 12:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you using fb functionality to your site ? – Nishant Feb 27 '15 at 12:04
  • Nope, modules used are: nagios, CKEditor, IMCE – Ôrel Feb 27 '15 at 12:17
  • Actually this issue occurred due to SESSION. – Nishant Feb 27 '15 at 12:18
  • If you are using any custom module & hold the SESSION or any SESSION created in any module then first check & try to close that SESSION. Your issue will solved. – Nishant Feb 27 '15 at 12:21
  • I have trash the session table, issue is still present. – Ôrel Feb 27 '15 at 12:52
0

I have found the root cause. The Geocaching. I am in Australia and the server is in France. The missing of /user/logout into the apache log warns me. I have tested with a french proxy and everything is ok.

My provider offers Geocaching, the page looks to be cached.

I have purge the geocache and /user/logout works!!

The first hit of a 403 for /user/logout triggers the same problem. This is easy to understand, when user/logout is success, the answer is a 302, nothing is added into the cache whereas a 403 is permanent so it is stored.

This explains why ?q=user/logout works, it is a query no caching is done.

To summarize deactivate the geocaching.

0

Try different way

  1. This works for me if I substitute the logged-in username for 'user', like this:

http://my_site/my_user/logout

ie:

http://example.com/jdoe/logout

  1. this might be problem with not enabling clean url in your site go to

http://example.com/admin/config/search/clean-urls

enable clean url and check if its working

  1. as you mentioned use http://example.com/user/logout will logout the current user section

Further readings: logout problem - https://www.drupal.org/node/1572984

enabling clean url - https://www.drupal.org/node/1572984

access denied + logout - https://www.drupal.org/node/2192401

  • clean url is working without problem. Your two links are the same. – Ôrel Feb 27 '15 at 12:38
  • 1
    so you have clean url enabled and when user go to user/logout he is still logged in. – DEVARAJ JOHNSON Feb 27 '15 at 12:41
  • yes, as far I remember it was working. I have only change the css of my theme and the page content, nothing special. – Ôrel Feb 27 '15 at 12:43

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