Last modified: 2014-08-15 16:40:06 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 T68879, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66879 - [[Special:RandomRootPage]] returning pages that are subpages due to overriding from elastic search
[[Special:RandomRootPage]] returning pages that are subpages due to overridin...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
RandomRootPage (Other open bugs)
unspecified
All All
: Unprioritized minor (vote)
: ---
Assigned To: Huji
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-20 14:10 UTC by Bawolff (Brian Wolff)
Modified: 2014-08-15 16:40 UTC (History)
5 users (show)

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


Attachments

Description Bawolff (Brian Wolff) 2014-06-20 14:10:18 UTC
+++ This bug was initially created as a clone of Bug #46420 +++

[[Special:RandomRootPage/]] is reported to be returning subpages on wikibooks
Comment 1 Sam Reed (reedy) 2014-06-20 14:12:36 UTC
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;
> 	}
Comment 2 Gerrit Notification Bot 2014-06-20 14:29:53 UTC
Change 140915 had a related patch set uploaded by Brian Wolff:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/140915
Comment 3 Gerrit Notification Bot 2014-06-20 14:33:08 UTC
Change 140915 merged by jenkins-bot:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/140915
Comment 4 Bawolff (Brian Wolff) 2014-06-20 14:42:36 UTC
(In reply to Gerrit Notification Bot from comment #3)
> Change 140915 merged by jenkins-bot:
> Don't override Special:Random if $extra is set
> 
> https://gerrit.wikimedia.org/r/140915

This should appear on wikibooks come July 1.
Comment 5 Gerrit Notification Bot 2014-06-24 14:57:12 UTC
Change 141697 had a related patch set uploaded by Chad:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/141697
Comment 6 Gerrit Notification Bot 2014-06-24 14:57:47 UTC
Change 141697 merged by jenkins-bot:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/141697
Comment 7 Gerrit Notification Bot 2014-06-24 14:58:02 UTC
Change 141698 had a related patch set uploaded by Chad:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/141698
Comment 8 Gerrit Notification Bot 2014-06-24 15:06:21 UTC
Change 141698 merged by jenkins-bot:
Don't override Special:Random if $extra is set

https://gerrit.wikimedia.org/r/141698
Comment 9 Andre Klapper 2014-06-30 11:22:00 UTC
All patches merged into the codebase; closing again as fixed.
Comment 10 Gerrit Notification Bot 2014-07-09 15:40:16 UTC
Change 144267 had a related patch set uploaded by Siebrand:
Add message documentation for newly added messages

https://gerrit.wikimedia.org/r/144267
Comment 11 Bawolff (Brian Wolff) 2014-07-09 21:06:51 UTC
(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
> 
> https://gerrit.wikimedia.org/r/144267

This patch is unrelated as far as I can tell.
Comment 12 Gerrit Notification Bot 2014-08-15 16:35:53 UTC
Change 144267 had a related patch set uploaded by Brian Wolff:
Add message documentation for newly added messages

https://gerrit.wikimedia.org/r/144267

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


Navigation
Links