Last modified: 2014-11-17 09:21:12 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 16655 - Install RandomRootPage on WMF wikis
Install RandomRootPage on WMF wikis
Status: REOPENED
Product: Wikimedia
Classification: Unclassified
Extension setup (Other open bugs)
unspecified
All All
: Normal enhancement with 7 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: shell
Depends on: 13051
Blocks: 31235
  Show dependency treegraph
 
Reported: 2008-12-15 22:45 UTC by Mike.lifeguard
Modified: 2014-11-17 09:21 UTC (History)
16 users (show)

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


Attachments

Description Mike.lifeguard 2008-12-15 22:45:21 UTC
Per bug 13051 comment 2, please install the RandomRootPage extension for Wikibooks wikis (http://www.mediawiki.org/wiki/Extension:RandomRootPage). I imagine this will require code review prior to actually doing it, so leaving out the 'shell' keyword.
Comment 1 Danny B. 2008-12-16 12:36:49 UTC
Install it on Wikisources as well because of the same reason.
Comment 2 Mike.lifeguard 2009-03-20 18:15:13 UTC
Nothing to do on shell until after code review.
Comment 3 Helder 2009-09-10 20:23:48 UTC
Any update on this?

Helder
Comment 4 Huji 2009-09-11 06:20:59 UTC
I'm wondering the code review process couldn't take more than a few minutes (if not seconds). The code is totally a rework of part of the MediaWiki core code. It should be as effective and work similarly.
Comment 5 Danny B. 2009-12-09 04:40:14 UTC
If it supports namespace selection, it should be actually installed on all WMF wikis (eg. Wikipedias have Portals, so do Wikinewses) or even moved to MediaWiki itself.
Comment 6 John Mark Vandenberg 2009-12-09 05:18:48 UTC
(In reply to comment #5)
> If it supports namespace selection, it should be actually installed on all WMF
> wikis (eg. Wikipedias have Portals, so do Wikinewses) or even moved to
> MediaWiki itself.

The extension does not support namespace selection like the core code does.

which means that [[special:random/portal]] often takes the reader to pages like:

http://en.wikipedia.org/wiki/Portal:British_Armed_Forces/Header
http://en.wikipedia.org/wiki/Portal:Silesia/Intro

Also, the extension logic excludes page names with a slash:

>   AND page_title NOT LIKE '%/%' 

which excludes pages like this:

http://en.wikisource.org/wiki/9/11_Commission_Report

Fixing these problems in core would be nice however special:random is really broken on Wikisource and Wikibooks, and this extension is a much needed band-aid.
Comment 7 Roan Kattouw 2009-12-09 10:17:12 UTC
I've looked at the extension and noticed it duplicates a crapload of code from SpecialRandom. It's currently 97 lines but could be reduced to like 10 by subclassing SpecialRandom and adding the LIKE clause to $this->extra.
Comment 8 Bawolff (Brian Wolff) 2011-09-28 13:54:45 UTC
(In reply to comment #7)
> I've looked at the extension and noticed it duplicates a crapload of code from
> SpecialRandom. It's currently 97 lines but could be reduced to like 10 by
> subclassing SpecialRandom and adding the LIKE clause to $this->extra.

It appears Reedy did this in r87598
Comment 9 Danny B. 2011-11-27 15:33:15 UTC
Any progress on code review and deployment, please? This is very much needed feature for many WMF wikis.
Comment 10 Sumana Harihareswara 2012-04-04 14:14:55 UTC
I'm very sorry for the delay in review.  Huji, could you please move the extension into Git?  I also posted at https://www.mediawiki.org/wiki/Extension_talk:Randomrootpage#Review_for_deployment .  Thanks.
Comment 11 Sumana Harihareswara 2012-04-05 12:25:07 UTC
Tim Starling reviewed this last night and said that it is ready to deploy.  Tim mentioned that he wanted to deploy it, so I'm assigning to Tim.
Comment 12 Helder 2012-04-06 02:49:34 UTC
Just a note: although this may (or may not) be rare, it is possible that a page contains "/" and is still a "root page".
For example, on Wikibooks there could be a book called "Programming in C/C++" and the page "Programming in C" doesn't exist, so the root page is "Programming in C/C++" itself, and woud have probability zero of being selected by the extension.
Comment 13 Sam Reed (reedy) 2012-04-06 03:04:27 UTC
(In reply to comment #12)
> Just a note: although this may (or may not) be rare, it is possible that a page
> contains "/" and is still a "root page".
> For example, on Wikibooks there could be a book called "Programming in C/C++"
> and the page "Programming in C" doesn't exist, so the root page is "Programming
> in C/C++" itself, and woud have probability zero of being selected by the
> extension.

I suppose the query should depend on whether subpages are enabled in a NS... If they are enabled, and you have a title that has a /, there isn't any way to distinguish that it's not actually a subpage of the root title..
Comment 14 Max Semenik 2012-04-06 08:27:42 UTC
Going ahead and declining this: no way we can allow "page_title NOT LIKE '%/%'" on production servers. Please reopen this bug once the extension is rewritten to work reasonably fast (which would require a schema change).
Comment 15 Bawolff (Brian Wolff) 2012-04-06 17:15:28 UTC
(In reply to comment #14)
> Going ahead and declining this: no way we can allow "page_title NOT LIKE '%/%'"
> on production servers. Please reopen this bug once the extension is rewritten
> to work reasonably fast (which would require a schema change).

Provided that the majority of pages do not have a / in them, that doesn't sound exactly horrible (In my uninformed opinion). Especially when compared to the filesort that dynamicpagelist does which is installed on wikibooks...

In my non-rigorous tests on the toolserver, 95% of the time for enwikibooks a suitable page would be within the first 15 pages looked at.
Comment 16 Tim Starling 2012-04-19 00:10:22 UTC
Like Bawolff says, the query is fast enough as long as the proportion of root pages is high enough. As long as there are more than say 1% root pages, the number of scanned rows should be tolerable.
Comment 17 Sumana Harihareswara 2012-04-19 00:19:49 UTC
Adding shell keyword since Tim is approving for deployment.  Sam or Huji, could you please move the extension into Git, by listing it at https://www.mediawiki.org/wiki/Git/Conversion/Extensions_queue , so it can be deployed? Thanks.
Comment 18 Huji 2012-04-21 17:26:04 UTC
I will move it to Git in the next few days.
Comment 19 snaevar 2012-05-14 11:02:30 UTC
The extension has been moved to git and the Review queue has been changed accordingly. The next step is that reedy should move the extension to the Development queue. I have notified him on his mediawiki talk page.
Comment 20 Sam Reed (reedy) 2012-05-16 01:10:54 UTC
This is dark deployed. I'll enable it when 1.20wmf3 is live everywhere
Comment 21 Sam Reed (reedy) 2012-05-30 19:39:41 UTC
Enabled on wikibooks and wikisource
Comment 22 aaron.adrignola 2012-05-31 21:58:37 UTC
This worked yesterday.  Today the below page doesn't exist:

http://en.wikibooks.org/wiki/Special:Randomrootpage
Comment 23 Sam Reed (reedy) 2012-05-31 22:40:05 UTC
Not sure what happened. Fixed again
Comment 24 Danny B. 2012-07-05 21:30:32 UTC
Reopening, as the request was to enable on all wikis. Consider portals i.e. on Wikipedias/Wikinewses etc...
Comment 25 Sam Reed (reedy) 2012-07-05 21:39:50 UTC
(In reply to comment #24)
> Reopening, as the request was to enable on all wikis. Consider portals i.e. on
> Wikipedias/Wikinewses etc...


(In reply to comment #16)
> Like Bawolff says, the query is fast enough as long as the proportion of root
> pages is high enough. As long as there are more than say 1% root pages, the
> number of scanned rows should be tolerable.
Comment 26 Danny B. 2012-07-05 21:44:16 UTC
Let's enable it on all wikis and disable on those which behave critical then. Like we do with other settings...
Comment 27 Andre Klapper 2012-10-18 01:08:14 UTC
Is there anything that is blocking this request? 
A check for the percentage of root pages?
Comment 28 This, that and the other (TTO) 2014-01-03 05:56:37 UTC
This currently seems to be enabled everywhere except Wikipedia and the special wikis.

Is there any reason why it cannot be enabled everywhere?

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


Navigation
Links