Last modified: 2008-09-21 01:03:41 UTC
I'm not sure whether this is a bug, or a misconfiguration of the software, but when viewing Special:Statistics at www.mediawiki.org, it includes the line There have been a total of 0 page views, and 25,124 page edits since the wiki was setup. That comes to 10.10 average edits per page, and 0.00 views per edit. The zeros are presumably because hit counting is disabled, but if this is the case then surely this information should not be displayed at all, i.e.: There have been a total of 25,124 page edits since the wiki was setup. That comes to 10.10 average edits per page. I notice that this is how it is displayed on en:wp, so maybe it is just a misconfiguration of the mediawiki.org site.
The problem, in effect, is the means via which the statistics text is generated; it's all lumped into one message, and then parameters are passed to it. As a workaround (an I've done this on the cited MediaWiki.org web site), the message can be altered. This isn't a fix, however; for the future, we could consider breaking the messages down further.
Fixed with r20304
Well, now it's like three lumps instead of one; it's still not very cleanly expandable. For instance if a new statistic is added, it won't be worked into a customized message. It might be more appropriate to break it down completely, one line/message per stat.
(In reply to comment #3) > It might be more appropriate to break it down completely, one line/message per stat. Even better would be to have some sort of table, while still providing messages for administrators to add blocks of text above and below it.
Reverted with r20363. I will figure out a solution like Rob mentioned in comment #4.
Hint: The annoing "0 page views" can be avoided with the {{PLURAL:1|N|0}} syntax, for languages having a 0-branch implemented.
*** Bug 10161 has been marked as a duplicate of this bug. ***
*** Bug 11034 has been marked as a duplicate of this bug. ***
See #10161 . OK, If you just must display stale values for items that arent't being counted anymore, then please also add an e.g., "as of Nov 11, 2007" datestamp in the message, so users know that they are stale. Two wrongs make a half right. Better yet just check if($wgDisableCounters) before emiting messages about things that it affects.
In Bug 11023 we see willingness not to show users items that have been disabled. Perhaps the same logic can be applied here.
*** Bug 12609 has been marked as a duplicate of this bug. ***
Fixed with r40636. Output now as a table.
I'm not sure if outputting as a table is the best approach. A flat output can easily be made tabular using CSS, as for example at http://www.mediawiki.org/wiki/Special:Statistics, but it is very hard to do this the other way. I guess the new format of the data is much more tabular so it isn't necessarily that it is inappropriate, but it does make it very difficult to style in any other way. For example, is it still possible to style it similarly to the above example? I can't test HEAD at the moment, so it would be useful to me if you could attach a screenshot of the new page, and possibly the generated HTML as well (or update testwiki...).
(In reply to comment #13) > I can't test HEAD at the moment, so it would be useful to me if you could > attach a screenshot of the new page, and possibly the generated HTML as well > (or update testwiki...). > It's live at betawiki: http://translatewiki.net/wiki/Special:Statistics
The MediaWiki.org one looks much prettier, I have to say.
(In reply to comment #15) > The MediaWiki.org one looks much prettier, I have to say. Agreed, and I don't think it's possible to re-style the proposed tabular output to look like this. Personally, I would prefer it if each statistic was a single string, but that they combined to perform a sentence as per the original. E.g. change this: ------------- "There are '''$1''' total pages in the database. This includes "talk" pages, pages about TestWiki, minimal "stub" pages, redirects, and others that probably don't qualify as content pages. Excluding those, there are '''$2''' pages that are probably legitimate content pages. '''$8''' files have been uploaded. There have been a total of '''$3''' page views, and '''$4''' page edits since TestWiki was setup. That comes to '''$5''' average edits per page, and '''$6''' views per edit. The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$7'''." ------------- into this: ------------- "There are '''$1''' total pages in the database. This includes "talk" pages, pages about TestWiki, minimal "stub" pages, redirects, and others that probably don't qualify as content pages." "Excluding those, there are '''$1''' pages that are probably legitimate content pages." "'''$1''' files have been uploaded." "There have been a total of '''$1''' page views," "and '''$1''' page edits since TestWiki was setup." "That comes to '''$1''' average edits per page," "and '''$1''' views per edit." "The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$1'''." ------------- If people then want to tweak the messages to be a list, a table, or anything else, they can just edit the individual messages as they want. In this way the current output, the newly proposed tabular output and the current MediaWiki output will all be possible.
How to change table style / sort order? The nice table at mediawiki.org (see http://www.mediawiki.org/wiki/MediaWiki:Sitestatstext) has been overwritten for example. Through this forced-on-all-wikis updated, art work and some content changes have disappeared, needing to be laboriously redone. Translation is possible, but table style / sort order?
How to re-use $6 with current layout? With {{FORMATNUM:{{#expr:(100 * $6 / {{NUMBEROFUSERS:R}})round2}}}}% it was possible to show a percentage of active users. How to do this now? ... not really happy with this forced change.
Oh, by the way, where is former $4 (percentage of sysops) gone?
See bug 15664 ("Improve the new Statistics special page"), as this bug is closed.