Last modified: 2014-07-20 14:21:15 UTC
Created attachment 13425 [details] -1 recent contributors in Special:UserLogin/signup I installed MediaWiki-Vagrant and when I go to create an account on my new wiki, in [[Special:UserLogin/signup]] I am told that "devwiki is made by people like you. 1 edit, 0 pages, -1 recent contributors".
I think this is because a developer counts as a negative contributor. ;) All jokes aside, that is an odd bug, and if it occurs on a regular fresh MediaWiki install as well, it'd be nice to get rid of it.
I saw this recently when re-installing a test wiki. Thanks for filing this bug, Dan.
Note that according to our spec this third item calls the {{NUMBEROFACTIVEUSERS}} magic word, so the error may actually be with that. You can test by calling that in a wiki page and seeing if you get the same result.
I think you're right, Steven. I've now created an account on the wiki so I can't verify that myself, but given that both that magic word and the page display zero, it seems likely.
It was a little tricky to track this down because the code doesn't reference messages fully by name, but I can confirm that it is using {{NUMBEROFACTIVEUSERS}} magic word: 'createacct-benefit-head3' => '{{NUMBEROFACTIVEUSERS}}', # do not translate or duplicate this message to other languages That magic word calls SiteStats::activeUsers(), which simply pulls an existing number out of the site_stats table: static function activeUsers() { self::load(); return self::$row->ss_active_users; } Looks like it's not updating invalid default data, or something.
(In reply to comment #5) > Looks like it's not updating invalid default data, or something. $ cat ./maintenance/archives/patch-ss_active_users.sql -- More statistics, for version 1.14 ALTER TABLE /*$wgDBprefix*/site_stats ADD ss_active_users bigint default '-1'; ...wat. I guess -1 was chosen to clearly differentiate between 'no stats available' and 'stat available and its value is zero', but I'd have guessed that that's what NULL is for.
Isn't Special:Statistics supposed to update ss_active_users if it hasn't been updated in the past 24 hours? It looks for the 'activeusers-updated' key and then runs SiteStatsUpdate::cacheUpdate().