Opened 13 years ago
Closed 7 years ago
#3590 closed enhancement (maybelater)
Who's online widget quick to show me not online.
Reported by: | pengume | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Members | Keywords: | trac-tidy-2018 |
Cc: | pengume@…, ronnystandtke, mail@… |
Description
After 2-5 minutes of inactivity, the Who's online widget shows the user not online even though they are still logged in.
You can simulate this by:
installing the who's online widget.
logging two users on.
wait 2-5 minutes then refresh one of the users page and it will not show the other logged in user online.
Change History (14)
#1
@
13 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
- Version 1.2.9 deleted
#2
@
12 years ago
- Cc ronnystandtke added
- Resolution worksforme deleted
- Status changed from closed to reopened
I just implemented Buddypress in our organization. Unfortunately, this issue is very troublesome for us because our users stay logged into Buddypress, often without much activity, and this way just disappear from the "Who's online" widget. But we would like to see *everybody* who is logged in, no matter if they are "active" right now or not.
It would be good if one could configure this timeout behavior in the widget settings.
#3
@
12 years ago
- Component changed from Core to Members
- Milestone set to Future Release
- Priority changed from normal to lowest
- Severity changed from normal to trivial
- Type changed from defect (bug) to enhancement
At the moment, it's true that it's not easy to customize the way the Who's Online widget works. FWIW, it's interesting that pengume and ronnystandtke are actually requesting two opposite things, which demonstrates the difficulty of a one-size-fits-all solution.
Punting to future release, as an enhancement ticket for adding the necessary filters to make the time interval more customizable.
#4
@
10 years ago
- Cc mail@… added
- Keywords needs-refresh added
- Priority changed from lowest to high
Hello, there!
Thank you so much for your great work. Well i used to develope for other OSC projects and now have some ideas regarding the BuddyPress widget “WHOIS ONLINE”.
As we know, the WHOIS-ONLINE-WIDGET currently does not auto-refresh its content, so the already logged-out users are still shown to be online. So my suggestions/ideas:
- Include a time counter, refreshing/showing automatically the list of users, who are really online.
- Also include/add a form field to the WHOIS-ONLINE-WIDGET (settings) in ADMIN SECTION, to have the administrator set his own value (example: 5 seconds).
- It would be great, if a mouse-over-effect could be included, that shows the “write a personal message”-link.
- OR: To show the AVATARS of online users with a batch or frame in different colour (manageable in ADMIN section) in the post-/comment-/users-list-area would be perfect.
Thanks a lot for your reply!
Truly
Tom
Please also see here: http://buddypress.org/support/topic/buddypress-whois-online-widget-refresh/
Question: Where can i change the time value (5 minutes = 300000 milliseconds) for the reload? Will it do the reload "inside" the widget (example: AJAX/JS or equal) or do i have to reload the page?
#5
follow-up:
↓ 6
@
10 years ago
tomlandon_author - Thanks for the suggestions. The limiting factor here is that we don't really have any reliable indicator that tells us whether someone is *actually* online. The only thing we have is their last_active value, which is updated every 5 minutes.
One consequence is that if you switch the "who's online" query to look for users whose last_active is less than 5 minutes ago, you'll miss a lot of members who are legitimately active. Take the following situation:
10:15 - Boone logs in. Last activity set to 10:15. Boone keeps browsing, but last_active is not bumped
10:17 - Tom logs in and sees the Who's Online widget. If it's set to look at users who have been recorded as active within the last 5 seconds, Boone will *not* show up.
10:20 - Boone continues browsing, and last_active is bumped
Question: Where can i change the time value (5 minutes = 300000 milliseconds) for the reload? Will it do the reload "inside" the widget (example: AJAX/JS or equal) or do i have to reload the page?
Filter 'bp_user_query_online_interval', line 250 https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-core/bp-core-classes.php#L243
#6
in reply to:
↑ 5
@
10 years ago
Dear boonebgorges, thanks a lot for replying - over all for your great work. Well, a user is registered to be online, as long as he does not click the LOGOUT-LINK (="offline"). The filter decision is suppost to be "either the user is logged in or he is logged-out". Right? After logging-in the BuddyPress widget "users online" simply would have to filter, if there are LOGGED-IN users to be shown. Of course the logged-out users do not have to be exposed.
So: "LAST ACTIVE" is not really important for that case/issue. Let us think about the BP plug-in "RS Buddypress Activity Refresh". It does nearly the same: Simply seeking for new posts and showing them in the BP history.
If it could be included to search the BP database for CURRENTLY LOGGED-IN USERS in a frequency, that is adjustable in the ADMIN SECTION, it would be perfect. Even, if the time value (in ms) for the time being could be set by editing the code it would be great.
Maybe something like that would do it:
<script type="text/javascript"> function WidgetRefresh() { $("#bpwidgetrefr").load(location.href+" #bpwidgetrefr>*",""); } setInterval(function() { WidgetRefresh(); }, 50000); </script>
But: I really don't know, if this would cause errors due to existence of other JS.
Thanks again for answering.
Truly
Tom LANDON
#7
@
10 years ago
The filter decision is suppost to be "either the user is logged in or he is logged-out". Right?
No. For two reasons. One: people can log into WP and stay logged in for a long time - think of the "Remember Me" checkbox on wp-login.php. Two: Logged-in status is stored in a browser cookie with an expiration date, and is *not* stored on the server. When a browser makes a page request, we know whether the requester is logged in or not. At all other times, BP does not have any idea at all who is and is not logged in. (We could, theoretically, keep track of who logs in and who logs out, but this would not account for expiring or deleted cookies, which are undetectable by the server.) Because of this, "who's online", when understood as "who has logged in but has not logged out" is not only technically infeasible, but is also not very informative - this could cover a huge number of a site's users.
Your idea for an auto-refreshing Who's Online widget is not a bad idea (though I'd want to do it on a more granular basis). But, again, it really can't be based on "logged in" status as you're understanding it.
#8
@
10 years ago
Thank you again. Well, if (and you told me) the LOGGED-IN status is not stored in the DB, it could be a key to store a session string (key) to the DB. At least the current stat ("is-logged-in/is-logged-out") would do it.
Example: If a project has a huge number of members (example: 15.000), it would need a lot of computing to read/filter all members. If a DB table is dedicated for logged-in users only, it could be the basis for the desired result. Detail: LOGGING-IN means to write the member number into the "LOGGED-IN table", LOGGING-OUT means to remove the member number from the table.
Thank you so much for diskussing this issue. It is really important to me.
Regards
Tom
#9
@
10 years ago
If a DB table is dedicated for logged-in users only, it could be the basis for the desired result. Detail: LOGGING-IN means to write the member number into the "LOGGED-IN table", LOGGING-OUT means to remove the member number from the table.
I don't think there would be much performance benefit to this at all. The way we currently query by last_active scales up pretty high without this kind of modification (and in fact, it works sorta similarly to what you suggest, except it's a "last_active" key in the activity table). If you had a proof of concept that showed that your suggestion was much more performant, I may be convinced.
Still, I have to emphasize that this table would *not* represent *currently logged in users* - only users who have, at one time or another, logged in.
#10
@
10 years ago
Thanks again. Well, during my "OSCommerce-time" i used session keys to log the online- and offline stats of a user. With my own OSC-installation i had about 2,5 Million transactions (purchases, pre-orders, delivery notes et cetera) a month. This worked great. There is a helpful plug-in ("WP Last Login") offered for Wordpress, that does something like that. It writes date/time to the DB table. Nothing more. :-)
So: I will do things for myself. :-)
Thank you for your time.
Tom
#11
@
8 years ago
- Keywords needs-refresh removed
To summarise:
- Check if we have filters to set the 'last updated' time limit.
- Consider adding auto-refresh to the who's online widget.
#13
@
7 years ago
- Keywords trac-tidy-2018 added
We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.
Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.
If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.
For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/
This is currently by design. There is a 5 minute interval where users are determined to no longer be online.