+++ This bug was initially created as a clone of Bug #46420 +++
[[Special:RandomRootPage/]] is reported to be returning subpages on wikibooks
Version: unspecified
Severity: minor
+++ This bug was initially created as a clone of Bug #46420 +++
[[Special:RandomRootPage/]] is reported to be returning subpages on wikibooks
Version: unspecified
Severity: minor
From bug 46420
(In reply to Sam Reed (reedy) from comment #5)
I guess the problem is that we're now using ElasticSearch to do the
randomness.Meaning the SQL query, and as such, the amended SQL query for
Special:RandomRootPage isn't actually run...Transplanting something like the below into the extension would fix this
issue/**
- Choose a random title.
- @return Title|null Title object (or null if nothing to choose from)
*/public function getRandomTitle() {
$row = $this->selectRandomPageFromDB( wfRandom() ); /* If we picked a value that was higher than any in * the DB, wrap around and select the page with the * lowest value instead! One might think this would * skew the distribution, but in fact it won't cause * any more bias than what the page_random scheme * causes anyway. Trust me, I'm a mathematician. :) */ if ( !$row ) { $row = $this->selectRandomPageFromDB( "0" ); } if ( $row ) { return Title::makeTitleSafe( $row->page_namespace, $row->page_title ); } return null;}
Change 140915 had a related patch set uploaded by Brian Wolff:
Don't override Special:Random if $extra is set
(In reply to Gerrit Notification Bot from comment #3)
Change 140915 merged by jenkins-bot:
Don't override Special:Random if $extra is set
This should appear on wikibooks come July 1.
Change 141697 had a related patch set uploaded by Chad:
Don't override Special:Random if $extra is set
Change 141698 had a related patch set uploaded by Chad:
Don't override Special:Random if $extra is set
Change 144267 had a related patch set uploaded by Siebrand:
Add message documentation for newly added messages
(In reply to Gerrit Notification Bot from comment #10)
Change 144267 had a related patch set uploaded by Siebrand:
Add message documentation for newly added messages
This patch is unrelated as far as I can tell.
Change 144267 had a related patch set uploaded by Brian Wolff:
Add message documentation for newly added messages