Since I installed DrupalChat (long polling method enabled) I'm experiencing logout problem to my site.
When I click on logout, "sometimes" I'm not really logged out but still logged-in!
And even when logout works, a simple page refresh will log me in, automatically (sometimes you need to click "refresh" more than once to let the bug occurr)
At the beginning I thought that logout problem was an issue depending on the browser.
(Effectively there is one affecting old browsers with Drupal: http://drupal.org/node/197786 . And there is also a patch for that: http://drupal.org/node/197786#comment-1055633. I tried that patch even if I'm using new browsers (you never know...) but it doesn't work)
So now I think the problem should really lie in DrupalChat.
Maybe a conflict between DrupalChat polling system and Drupal login/logout system.
Any ideas?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#8 | drupalchat_poll.txt | 2.56 KB | Bbi |
Comments
Comment #1
Mackee CreditAttribution: Mackee commentedFor me it still not working even though I use the patch. It will log me out, but after pressing refresh many times the issue still happens.
Comment #2
diego.pasc CreditAttribution: diego.pasc commentedYes you are right neriweaver!
It is not working even with that patch.
I will update the issue content mentioning that the patch is not working.
Comment #3
shiftymic CreditAttribution: shiftymic commentedI am having this problem too. After logging out, visiting a different publicly viewable page reveals that I am somehow still logged in (not all the time though, just on occasion).
Anyone know the difference between AJAX and long-polling ---- I too am using long-poll, but perhaps using ajax could fix it?
Also -- issue was seen in Chrome -- didn't notice anything in Firefox, so maybe its an issue with the browser?
Much obliged for any leads/help, otherwise this module is great!
Comment #4
Mackee CreditAttribution: Mackee commentedTo my knowledge ajax is currently not working.
Comment #5
praveen2k4 CreditAttribution: praveen2k4 commentedI have the same issue. After logout, few clicks on pages linked inside the site will log me back in.
Comment #6
Bbi CreditAttribution: Bbi commentedI removed my session in the database, but drupal continues logging me back. Go on searching a solution.
Comment #7
carvalhar CreditAttribution: carvalhar commentedsame problem here.
Comment #8
Bbi CreditAttribution: Bbi commentedI just created a patch thats is working for me.
Open the file drupalchat.module and find drupalchat_poll() function.
Add these lines under sleep(3):
//-------------------------------------------------------------------------------------------------------
$checkUnlog="SELECT timestamp FROM sessions WHERE sid='$user->sid' AND uid =0";
$result=db_query($checkUnlog);
$filas = db_affected_rows($result);
if($filas!=0){
$user->uid=0;
exit(1);
}
//--------------------------------------------------------------------------------------------------------
This code detects when the user closed session and prevents the module re-open the session.
I have attached the full function just to replace the drupalchat.module
I hope that will work well on your site.
Comment #9
carvalhar CreditAttribution: carvalhar commentedi think #8 worked ;)
Comment #10
darklrd CreditAttribution: darklrd commented@hksbrey - Thanks for you contribution. I will review the patch and commit it soon. :-)
Comment #11
diego.pasc CreditAttribution: diego.pasc commentedJust edited the code in drupalchat.module according patch #8 and... it seems to work well!
Thanks a lot community! :)
ps: better just to rewrite a bit the patch according Drupal standards:
Comment #12
Mackee CreditAttribution: Mackee commentedIt works!!! Thanks for the great help! =)
I'm just curious, is there any of you experience a site maintenance. On my site drupalchat now works but after a few times of using chat, my site will suddenly goes on maintenance mode. I suspect it's due to high server load, I'm not sure though. But it only happens on my site when I use drupalchat with long polling method.
Any help with this is highly appreciated.
Comment #13
carvalhar CreditAttribution: carvalhar commented@neriweaver
i think it should be another issue. But try to install your site at a local copy just to test, if everything works fine it's definitely a server issue.
Comment #14
darklrd CreditAttribution: darklrd commentedFixed in 6.x-2.0-beta5.
Comment #15.0
(not verified) CreditAttribution: commentedThe issue has been completely addressed to DrupalChat. (At the beginning I was not sure if the problem was due to DrupalChat or to the browser cache system)
Comment #16
v8powerage CreditAttribution: v8powerage commentedim not using polling but iflychat api and I have same issue