Observed on 1.27.0-wmf.8 Wikimedia projects. An additional MediaWiki: prefix was prepended to every target link pointing to a JS script/CSS stylesheet on Special:Gadgets, resulting in page titles like MediaWiki:MediaWiki:Gadget-citations.js (see test.wikipedia.org).
Description
Details
Event Timeline
Actually, it is pre-pended and I confirm this is a regression that has been recently added.
https://gerrit.wikimedia.org/r/228781 is responsible for this bug.
Why?
foreach ( $gadget->getScriptsAndStyles() as $codePage ) { $t = Title::makeTitleSafe( NS_MEDIAWIKI, $codePage ); // ... $lnk[] = Linker::link( $t, htmlspecialchars( $t->getText() );
So you say $t at this point is already a botched title? This in turn would mean that $codePage is wrong?
https://gerrit.wikimedia.org/r/228781 is responsible for this bug.
Why?
I besected the problem to this change.
foreach ( $gadget->getScriptsAndStyles() as $codePage ) { $t = Title::makeTitleSafe( NS_MEDIAWIKI, $codePage ); // ... $lnk[] = Linker::link( $t, htmlspecialchars( $t->getText() );So you say $t at this point is already a botched title? This in turn would mean that $codePage is wrong?
I didn't analyzed the intend of the change.
Yeah, this is my fault, sorry.
Yes, $t is wrong here, because $codePage already has the namespace, so it should use Title::newFromText().
Change 258204 had a related patch set uploaded (by Legoktm):
Fix double "MediaWiki:MediaWiki:" namespace on Special:Gadgets
Change 258204 merged by jenkins-bot:
Fix double "MediaWiki:MediaWiki:" namespace on Special:Gadgets
Change 258209 had a related patch set uploaded (by Legoktm):
Fix double "MediaWiki:MediaWiki:" namespace on Special:Gadgets
Change 258209 merged by jenkins-bot:
Fix double "MediaWiki:MediaWiki:" namespace on Special:Gadgets