Just started seeing this recently. On 3.4.0.beta4-dev, and have been updating dilligently. Any idea where I should look for trouble?
2 לייקים
Hey Geoffrey,
Is the plugin up to date?
The latest version is:
3 לייקים
Do you see any error in the browser’s console?
I can’t reproduce it on a local dev and production instance.
2 לייקים
Good idea! I’ll take a look next time I see it. It seems to happen sporadically. I looked at the backend logs and nothing jumped out at me…
As a suggestion, given that this message is only shown to administrators, it might be helpful if it provided more details about the problem, assuming that whatever is generating it in fact has more details. It’s already taking up a fair bit of screen real estate for a “something’s wrong” message.
I can’t reproduce on a clean production instance, but I do see an error on a dev instance:
this._super();
document.body.classList.remove("user-page-online");
},
});
if (siteSettings.whos_online_avatar_indicator_topic_lists) {
const addLastPosterOnlineClassNameTransformer = ({
value: additionalClasses,
context: { topic },
}) => {
const whosOnline = api.container.lookup("service:whos-online");
const lastPosterId = topic.lastPoster.id;
const lastPosterUserId = topic.lastPosterUser.id;
if (whosOnline.isUserOnline(lastPosterId || lastPosterUserId)) {
additionalClasses.push("last-poster-online");
}
return additionalClasses;
};
@readOnly("channel.users") users;
@readOnly("channel.count") count;
@readOnly("channel.countOnly") countOnly;
init() {
super.init(...arguments);
this.set("channel", this.presence.getChannel("/whos-online/online"));
if (this.enabled) {
this.channel.subscribe(Site.currentProp("whos_online_state"));
}
this.addObserver("users.[]", this, this._usersChanged);
}
_usersChanged() {
const currentUserIds = new Set(this.users?.map((u) => u.id) || []);
const prevUserIds = this._prevUserIds || new Set([]);
const enteredUsers = [...currentUserIds].filter((x) => !prevUserIds.has(x));
Retrieving the service outside the transformer seems to fix the issue.
Related to DEV: Upgrade to the Glimmer topic list by megothss · Pull Request #117 · discourse/discourse-whos-online · GitHub .
2 לייקים
saquetim
(Sérgio Saquetim)
23 בינואר, 2025, 1:54am
7
This issue should be addressed by:
discourse:main
← discourse:dev/prevent-ember-same-computation
opened 01:39AM - 23 Jan 25 UTC
7 לייקים
sam
(Sam Saffron)
נסגר ב־
26 בינואר, 2025, 9:00pm
8
This topic was automatically closed after 2 days. New replies are no longer allowed.