Page MenuHomePhabricator

CodeMirror breaks NWE on labs: "TypeError: mwConfig is null"
Closed, InvalidPublic

Description

When I try to edit page (on labs, as of 06 august 2017) using 2017 editor, it does not end loading (progress bar stops). It shows errors releated to codemirror, even I disable this in preferences (this may be additional issue).

TypeError: mwConfig is null  mediawiki.js:26:4
<anonymous> https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/mode/mediawiki/mediawiki.js:26:4
	getMode https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:1439:17
	loadMode https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:4464:17
	attachDoc https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:4562:3
	CodeMirror$1 https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:7436:3
	CodeMirror$1 https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:7389:49
	ve.ui.CodeMirrorAction.prototype.toggle https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/modules/ve-cm/ve.ui.CodeMirrorAction.js:46:20
	ve.ui.Surface.prototype.execute https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/lib/ve/src/ui/ve.ui.Surface.js:691:10
	ve.ui.Command.prototype.execute https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/lib/ve/src/ui/ve.ui.Command.js:40:10
	ve.ui.CodeMirrorTool.prototype.onSurfaceChange https://en.wikipedia.beta.wmflabs.org/w/extensions/CodeMirror/resources/modules/ve-cm/ve.ui.CodeMirrorTool.js:61:3
	oo.EventEmitter.prototype.emit https://en.wikipedia.beta.wmflabs.org/w/resources/lib/oojs/oojs.jquery.js:829:5
	ve.ui.Toolbar.prototype.setup https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/lib/ve/src/ui/ve.ui.Toolbar.js:76:3
	ve.init.Target.prototype.setupToolbar https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/lib/ve/src/init/ve.init.Target.js:519:2
	ve.init.mw.ArticleTarget.prototype.setupToolbar https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTarget.js:1813:2
	ve.init.mw.DesktopArticleTarget.prototype.setupToolbar https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:256:2
	ve.init.Target.prototype.setSurface https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/lib/ve/src/init/ve.init.Target.js:469:3
	ve.init.mw.Target.prototype.setSurface https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.Target.js:408:2
	ve.init.mw.DesktopArticleTarget.prototype.setSurface https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js:494:2
	ve.init.mw.Target.prototype.setupSurface/</< https://en.wikipedia.beta.wmflabs.org/w/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.Target.js:381:4

Event Timeline

Wargo created this task.Aug 6 2017, 10:41 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptAug 6 2017, 10:41 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Wargo updated the task description. (Show Details)Aug 6 2017, 10:45 AM

For some reason the config variable is null. Can't reproduce locally, must be a server config issue?

Aklapper renamed this task from CodeMirror brokes NWE on labs to CodeMirror breaks NWE on labs: "TypeError: mwConfig is null".Aug 7 2017, 4:24 PM

Can't reproduce on en.wikipedia.beta.wmflabs.org

Make sure you have enabled both NWE and CodeMirror and CodeMirror is activated completely (colors on new editor or activate in normal editor before).

Deskana closed this task as Invalid.EditedAug 23 2017, 2:55 PM
Deskana added a subscriber: Deskana.

I enabled both the "New wikitext mode" and "Wikitext syntax highlighting" on en.wikipedia.beta.wmflabs.org, and tried editing a page. It worked just fine. Everything seems to be okay now.

Restricted Application added a project: Community-Tech. · View Herald TranscriptFeb 9 2018, 4:03 PM
TBolliger moved this task from Untriaged to Archive on the Community-Tech board.Feb 14 2018, 1:12 AM