By yersin on
Hi, everybody.
My problem is that online users disappear from the "Who's online" block when they're online. The users disappears from the list after some minutes he is online. I'm sure that they're online because the logs show that they've opened a session but haven't closed it. Besides that, I've opened a session from a different account I don't see my other account online (from different pcs, just in case).
I think that the problem may have started after I installed and uninstalled a module called autologout. I'm not very sure, though.
How can I solve this problem?
Thanks for your help in advance.
Yersin
Comments
More information
I forgot to mention that when I'm the only user online, after some minutes I see 0 users online, even though I'm online.
"There are currently 0 users and 0 guests online."
- yhh -
'Who's Online' Module incorrectly reporting
I have found a couple of other reports of problems with this module, but no solutions, so I post the behavior on my site in hopes of getting to the bottom of an obvious bizarre behavior.
My Drupal 6.8 core, with a bunch of modules, appears to have a problem reporting an accurate number of users online along with their usernames.
Scenario 1: I'm logged in as Admin (IE). Nobody else is currently on the site. I'm clicking around the site, and the module suddently reports '0 users and 0 guests'. I use the navbar and click on another section of the site. Same behavior. I click on another section of the site, then I show up.
Scenario 2: I'm logged in as Admin (IE). I open FF, log in as another user (plain old authenticated user). I show up correctly in FF, along with my other self (Admin). I go back to IE, where I'm Admin, and click on a link within the site--I show up, along with my other self (authenticated user). Everything appears to work fine, however occasionally I'll see the other user drop off (though I am still logged in in the other browser), then randomly come back.
Scenario 3: I'm typing in this bug report, and I go back to my site to play with it for more behaviors. The site is showing the correct number of users. I refresh (IE) through the browser, and it reports zero users. I hit refresh again, and it shows the correct users.
Twice, when the module reports no one on line, I'll refresh, then see myself; then I'll refresh, and see my other self as well--that is to say, the users don't change, but the query appears to miss all users the first time it tries... I have confirmed this particular behavior happens regardless of user role.
There's never been a mismatch between the reported count of users and their usernames listed. It's only been a misreporting of who I know to be on line.
I've varied the cache on my browsers with no change in behavior. I really don't think the behavior is coming from cached pages.
I love Drupal, it is a super tool, so this is of course all in the spirit of a better Drupal.
Any suggestions are appreciated.
More details
Me again.
Next Scenario:I'm logged in as Admin (in IE), and show up in the 'Who's Online' module.
I go to FF and log in as authenticated user, I'll see my authenticated user name, but not Admin, whom I know is logged in over at IE. Despite repeated refreshs, or navigation around the site, Admin never shows online.
Then I go over to IE, where I'm logged in as Admin, and refresh once. Admin disappears, and my authenticated username shows up. I click refresh again, and both admin and the authenticated user name show up.
I go back over to FF, where I'm logged in as Authenticated user, and show up (remember, no Admin showing up here), and click refresh, and voila, both Admin and authenticated user show up.
Next Try:
Both logged in. I go now to authenticated user, and click on a link and get no users listed as on line; refresh, and get myself, authenticated user. Click refresh or click around the site, and Admin never shows up, until I go over to the Admin session and do something like click on a link(*). Going back to the authenticated user session, both user and Admin show up and work fine, so it seems like the user drops off the radar if not active for a while, even though logged in?
Okay, weird. To add to this, in the above paragraph where I put the asterisk, in that browser (where admin is logged in but has been inactive for a bit, say, a few minutes), Who's online reports the authenticated user but now I've disappears as admin.
So it appears that this behavior is not dependent on user roles. It also appears that refresh doesn't fix the problem, and the disappearing act is somewhat dependent on activity, not just login status.
...and after another few minutes
I think the '0 users and 0 guests' message appears after the user(s) have been inactive for a period of minutes on the site, even though they are logged in.
This might explain why when I had a bunch of people online and on the telephone all together people dropped off the 'Who's Online' module every once in a while, then when people noticed and mentioned it, just clicking around the site by the person who disappeared made them reappear...
Ugh--Read the Instructions
Here's what's going on!
The name of the module (Who's Online) is a bit misleading. If you go to the module configuration you will see that the settings control the listing of who's online not by whether or not they are logged in, but rather by their last activity on that page.
I, probably along with a bunch of others, assumed the setting was for the number of minutes their names stayed on the list after they've logged off, and not so!
Recommendation: if you want a reasonably accurate reporting of who's online, set the value in this module to something that exceeds the approximate idle time while on the site. For me, it's set now to ten minutes, so people don't just disappear as described above (I had it set for 2 minutes, which explains the behavior above).
It might help to highlight this behavior in the documentation--anyone have a suggestion for the best place for this to be captured?