https://bugzilla.wikimedia.org/show_bug.cgi?id=57647
Bawolff (Brian Wolff) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Bawolff (Brian Wolff) <[email protected]> --- (In reply to comment #0) > > This change fixes the bug for me, but it seems kind of hackish: > diff --git a/includes/WebRequest.php b/includes/WebRequest.php > index b17cb9e..05ffae7 100644 > --- a/includes/WebRequest.php > +++ b/includes/WebRequest.php > @@ -1382,7 +1382,8 @@ class FauxRequest extends WebRequest { > } > > public function getRequestURL() { > - $this->notImplemented( __METHOD__ ); > + global $wgTitle; > + return $wgTitle->getLocalURL(); > } > > /** > > It works, though: > > $ php maintenance/rebuildFileCache.php > Building content page file cache from page 0! > Cached page 1 > Cached page 2 > Done! > > How should I submit this change? Sorry, but that's probably going to be too hacky to be accepted. ($wgTitle is not allowed to be used in new code). I'm not entirely sure why we're outputting the WebRequest::getRequestUrl as the canonical url. Maybe it might make sense to change the OutputPage::getHeadLinksArray method to use $this->getTitle()->getLocalURL(); instead of $this->getRequest()->getRequestURL(). (I haven't looked at the code very much at all, but intuitively, the canonical link shouldn't have extra junk from the url anyway) ---- For reference, you can submit patches to our gerrit (https://gerrit.wikimedia.org) install. Accounts are free, and available by signing up at http://wikitech.wikimedia.org. There's detailed instructions at https://www.mediawiki.org/wiki/Gerrit/Tutorial . Alternatively you can upload a patch via http://tools.wmflabs.org/gerrit-patch-uploader/ without having to go through all the git set up. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
