Last modified: 2014-07-20 14:21:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56888, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54888 - Fresh install of MediaWiki lists "-1 recent contributors" in Special:UserLogin/signup
Fresh install of MediaWiki lists "-1 recent contributors" in Special:UserLogi...
Status: NEW
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.22.0
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 18:29 UTC by Dan Garry
Modified: 2014-07-20 14:21 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
-1 recent contributors in Special:UserLogin/signup (6.52 KB, image/png)
2013-10-02 18:29 UTC, Dan Garry
Details

Description Dan Garry 2013-10-02 18:29:13 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".
Comment 1 Steven Walling 2013-10-03 03:14:16 UTC
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.
Comment 2 MZMcBride 2013-10-03 03:16:19 UTC
I saw this recently when re-installing a test wiki.

Thanks for filing this bug, Dan.
Comment 3 Steven Walling 2013-10-03 03:21:13 UTC
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.
Comment 4 Dan Garry 2013-10-03 11:13:40 UTC
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.
Comment 5 Brion Vibber 2013-10-03 15:30:05 UTC
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.
Comment 6 Ori Livneh 2013-10-03 17:12:17 UTC
(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.
Comment 7 Nathan Larson 2014-07-20 14:21:15 UTC
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().

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links