Page MenuHomePhabricator

Classic toolbar (2006 wikitext editor) buttons displayed twice
Closed, ResolvedPublic

Description

Screen Shot 2018-05-24 at 19.33.06.png (396×1 px, 149 KB)

view-source
						<div style="clear: both;"></div>
		</div>
		<script>(window.RLQ=window.RLQ||[]).push(function(){mw.loader.using("mediawiki.toolbar", function () {mw.toolbar.addButton(false,"Bold text","'''","'''","Bold text","mw-editbutton-bold");mw.toolbar.addButton(false,"Italic text","''","''","Italic text","mw-editbutton-italic");mw.toolbar.addButton(false,"Internal link","[[","]]","Link title","mw-editbutton-link");mw.toolbar.addButton(false,"External link (remember http:// prefix)","[","]","http://www.example.com link title","mw-editbutton-extlink");mw.toolbar.addButton(false,"Level 2 headline","\n== "," ==\n","Headline text","mw-editbutton-headline");mw.toolbar.addButton(false,"Embedded file","[[File:","]]","Example.jpg","mw-editbutton-image");mw.toolbar.addButton(false,"File link","[[Media:","]]","Example.ogg","mw-editbutton-media");mw.toolbar.addButton(false,"Ignore wiki formatting","\u003Cnowiki\u003E","\u003C/nowiki\u003E","Insert non-formatted text here","mw-editbutton-nowiki");mw.toolbar.addButton(false,"Horizontal line (use sparingly)","\n----\n","","","mw-editbutton-hr");});});</script><script>(window.RLQ=window.RLQ||[]).push(function(){mw.loader.using("mediawiki.toolbar", function () {mw.toolbar.addButton(false,"Bold text","'''","'''","Bold text","mw-editbutton-bold");mw.toolbar.addButton(false,"Italic text","''","''","Italic text","mw-editbutton-italic");mw.toolbar.addButton(false,"Internal link","[[","]]","Link title","mw-editbutton-link");mw.toolbar.addButton(false,"External link (remember http:// prefix)","[","]","http://www.example.com link title","mw-editbutton-extlink");mw.toolbar.addButton(false,"Level 2 headline","\n== "," ==\n","Headline text","mw-editbutton-headline");mw.toolbar.addButton(false,"Embedded file","[[File:","]]","Example.jpg","mw-editbutton-image");mw.toolbar.addButton(false,"File link","[[Media:","]]","Example.ogg","mw-editbutton-media");mw.toolbar.addButton(false,"Ignore wiki formatting","\u003Cnowiki\u003E","\u003C/nowiki\u003E","Insert non-formatted text here","mw-editbutton-nowiki");mw.toolbar.addButton(false,"Horizontal line (use sparingly)","\n----\n","","","mw-editbutton-hr");});});</script><script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":6063,"wgHostname":"20e70295f2ab"});});</script>
	</body>
</html>

Looks like EditPage.php is outputting the same script twice.

EditPage.php
		$wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) );
		// ..
		if ( Hooks::run( 'EditPageBeforeEditToolbar', [ &$toolbar ] ) ) {
			// ...
			$wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) );
		};

Regression since rMW70941efd3556: Initial support for Content Security Policy, disabled by default

Event Timeline

The patch in question was reverted (last week) in wmf.4 due to other issues, but is still (unresolved) in master and wmf.5.

Change 435063 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] EditPage: Fix duplicate classic toolbar

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

Change 435063 merged by jenkins-bot:
[mediawiki/core@master] EditPage: Fix duplicate classic toolbar

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

Jdforrester-WMF renamed this task from Classic toolbar buttons displayed twice to Classic toolbar (2006 wikitext editor) buttons displayed twice.May 24 2018, 11:41 PM
Vvjjkkii renamed this task from Classic toolbar (2006 wikitext editor) buttons displayed twice to accaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed matmarex as the assignee of this task.
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: matmarex; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from accaaaaaaa to Classic toolbar (2006 wikitext editor) buttons displayed twice.Jul 2 2018, 1:19 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to matmarex.
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: matmarex.