Page MenuHomePhabricator

{{NUMBEROFACTIVEUSERS}} doesn’t get updated when $wgMiserMode = false
Open, Needs TriagePublic

Description

{{NUMBEROFACTIVEUSERS}} is currently only updated by updateSpecialPages.php. Thus for people with $wgMiserMode = false who never run updateSpecialPages.php, the variable will be out of date.


The magic word {{NUMBEROFACTIVEUSERS}} remains stuck at 0.
This can be seen in Special:Statistics, Special:CreateAccount and wherever the magic word is included in a page.

The Special:ActiveUsers page, however, works fine and lists the active users.

Have already tried:

initSiteStats.php --update

but it didn't help.


Version: 1.28.0-alpha (5726c9c) 04:18, 12 July 2016
PHP 5.6.22 (cgi-fcgi)
MySQL 5.6.30-log
ICU 50.1.2
Lua 5.1.5

See Also:

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 12 2016, 12:09 PM

Hi @AhmadF.Cheema, thanks for taking the time to report this!
Has this been already brought up on https://www.mediawiki.org/wiki/Project:Support_desk ?

No, sorry, should I have done that first?

Solved (kind of).

Just tried a new test install:
MediaWiki 1.28.0-alpha (b8804f6)

  • This time the number of recent contributors (or {{NUMBEROFACTIVEUSERS}}) was stuck at -1 instead of 0. This reminded me of an old MediaWiki bug.
  • T22017 indicated a temporary fix using:
php maintenance/initStats.php --active --update
  • Because of the change in the maintenance .php file, used the following command in SSH:
php maintenance/initSiteStats.php --active
  • This fixed the issue.
  • However, it should be pointed out that I had previously run multiple times:
php maintenance/initSiteStats.php --update
  • which didn't help. It did update the other variables (like number of edits etc.) but not the number of active users.
  • Created another test account, to see if the number was updating now automatically or not.
  • It wasn't. Had to run "initSiteStats.php --active" again to update the value.
  • Tested again to repeat the results and make sure there wasn't a jobs backlog problem.
  • There wasn't. The issue is persistent and unable to be fixed without running: "initSiteStats.php --active".

I can confirm this happens in my wiki after upgraded to MW 1.27.1.

In my case all active user (number in special:statics, api result, and {{NUMBEROFACTIVEUSERS}}) number stuck in the number where it been updated last time. Manually run php maintenance/initSiteStats.php --active or php maintenance/UpdateSpecialPages.php are the two only way to get active user number change.

Check the "Active Users and Users" session in https://wikiapiary.com/wiki/Moegirlpedia_(zh) . The active users number stuck at 1030 after Oct23, at 899 after Nov18.

Hope the patch were include in MW 1.27.2 as well as the master version.

(User number counting were not affected)

Oznogon added a subscriber: Oznogon.Jul 5 2017, 9:23 AM
Seb35 renamed this task from {{NUMBEROFACTIVEUSERS}} stuck at 0 to {{NUMBEROFACTIVEUSERS}} doesn’t get updated.Jan 13 2018, 6:04 PM
Seb35 added subscribers: Bawolff, Seb35, aaron, Camponez.
Marianian triaged this task as Normal priority.Feb 16 2018, 10:49 AM
Marianian added a subscriber: Marianian.

Developers, yesterday I reported a similar issue (see the support thread) because I could not find a solution to the active users problem and I have been directed here.

For the record:

NSindex have run into an annoying problem where the number of active users ({{NUMBEROFACTIVEUSERS}}) fails to update automatically and I have to run the following to get it to update automatically:

initSiteStats.php --active

Compare this (40 users) with this (currently 38 users as of 1140 CET, 16 February 2018).

I feel that this is a very annoying bug because we recently adopted a home page based on the French Wikipedia, which also monitors the number of active users. I am sure it used to update itself automatically before, and I didn't have to use crontab. Obviously not everyone has access to crontab when it comes to simple hosting.

Currently using:

  • MediaWiki 1.30 (the latest version at time of report)
  • PHP 5.6.30
  • Database MySQL 5.5.55

I wish to classify this issue as “normal” because this is an annoying issue that has yet to receive serious attention for over 1.5 years. We at NSindex have noticed the bug being present in our site for more than a year now.

Bawolff renamed this task from {{NUMBEROFACTIVEUSERS}} doesn’t get updated to {{NUMBEROFACTIVEUSERS}} doesn’t get updated when $wgMiserMode = false.Feb 16 2018, 12:52 PM
Aklapper raised the priority of this task from Normal to Needs Triage.Feb 16 2018, 1:00 PM

@Aklapper I am new to the bug reporting system; @Bawolff I just tried running MW 1.30 with $wgMiserMode = false defined, but there was no effect on getting the statistics to update itself again. :-(

@Aklapper I am new to the bug reporting system; @Bawolff I just tried running MW 1.30 with $wgMiserMode = false defined, but there was no effect on getting the statistics to update itself again. :-(

Yes, because the bug is present when $wgMiserMode = false; (The default). The bug will go away if miser mode is true and you run updateSpecialPages.php in a cron script once a day, but that's probably not a very good solution for most people.

Bawolff updated the task description. (Show Details)Feb 16 2018, 1:43 PM
Zoglun added a subscriber: Zoglun.Nov 25 2018, 11:12 AM

We encounter a new error in MW 1.31.
The active user number droped from 1.3k to 50 after php /var/www/wiki/maintenance/rebuildall.php .

Neither php maintenance/initStats.php --active --update nor php maintenance/UpdateSpecialPages.php fix the number count error. However, the Special:ActiveUsers page do show all 1.3k editors' name at the same time.

$wgMiserMode = false / true doesn't seem to affect the active users number anymore this time. It's always 50.

We encounter a new error in MW 1.31.
The active user number droped from 1.3k to 50 after php /var/www/wiki/maintenance/rebuildall.php .

Neither php maintenance/initStats.php --active --update nor php maintenance/UpdateSpecialPages.php fix the number count error. However, the Special:ActiveUsers page do show all 1.3k editors' name at the same time.

$wgMiserMode = false / true doesn't seem to affect the active users number anymore this time. It's always 50.

This looks like a different problem. Please create a new task for this