Last modified: 2008-01-15 04:48:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12536 - User should be able to get MediaWiki version from any page
User should be able to get MediaWiki version from any page
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: High enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-01-07 10:28 UTC by Edward Chernenko
Modified: 2008-01-15 04:48 UTC (History)
5 users (show)

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


Description Edward Chernenko 2008-01-07 10:28:35 UTC
Many bots rely on the version of MediaWiki engine. But they need to make additional request to Special:Version each time they start. For bots involked by cron, recursive bots etc. that causes a large number of unneeded requests to servers. More serious problem is that the format of Special:Version may change as the format of any other pages, and bot won't be able to handle this.

I suggest doing a very simple thing. Let's add a variable, say 'wgMWVersion', to each page, into the block where we define wgScript, wgServer etc. for javascripts.

I'm setting priority to High because it would be possible to write bots fully compatible with older version of MediaWiki only when this feature will be enabled, and only for versions where it is enabled. Don't think that it's hard to implement this, but we need that feature right now.

Thank you.
Comment 1 Victor Vasiliev 2008-01-12 12:31:35 UTC
Fixed in r29647.
Comment 2 Tim Starling 2008-01-12 13:40:10 UTC
You could increase the global request rate for Special:Version by 50 times, and you'd still use less server CPU time than this feature. SpecialVersion::getVersion() is too slow to be calling on every request. I'll have to revert this. Use api.php?action=query&meta=siteinfo if you want to be server-friendly.
Comment 3 Rotem Liss 2008-01-12 13:50:03 UTC
Why is this function so slow? If the problem is getSvnRevision, could $wgVersion be used for this variable instead of calling SpecialVersion::getVersion?
Comment 4 Tim Starling 2008-01-12 13:54:30 UTC
Mostly getSvnRevision(). Also, on systems without a bytecode cache, loading SpecialVersion.php will be slow. Using $wgVersion would be fine.
Comment 5 Edward Chernenko 2008-01-12 14:30:49 UTC
Well, we can hardcore version inside GlobalSettings.php and then use it instead of calling getVersion().
Comment 6 Edward Chernenko 2008-01-12 14:31:30 UTC
Comment 7 Rotem Liss 2008-01-12 14:34:06 UTC
(In reply to comment #5)
> Well, we can hardcore version inside GlobalSettings.php and then use it instead
> of calling getVersion().

We already do so (in DefaultSettings.php), this is $wgVersion. The version is hardcoded there, but not the SVN revision. (BTW, couldn't SVN properties be used to get SVN revision, instead of the file .svn/entries?)
Comment 8 Edward Chernenko 2008-01-12 15:13:04 UTC
Let's use $wgVersion then. SVN revision is not needed at all - bots are usually written for stable versions of MediaWiki, and in most cases bots will work with stable versions only.
Comment 9 Victor Vasiliev 2008-01-15 04:48:46 UTC
Fixed in r29757

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