Page MenuHomePhabricator

Sometimes Enable/Disable button is broken: "Node was not found in codemirror.js:5965"
Closed, ResolvedPublic

Description

From MW 1.27 CodeMirror Enable/Disable button doesn't work sometimes.

  • Seems textarea are replaced by JS and if it happened after the CodeMirror initialization, button doesn't work.
  • Also seems sometimes enable/disable button may not appear on the toolbar. Most likely it happens when a user enters the editing mode for the first time.

Event Timeline

Are there any errors in the Developer Tools' console of your web browser when this happens?

In the first case error is:

NotFoundError: Node was not found in codemirror.js:5965
trace:

CodeMirror.fromTextArea/options.finishInit/cm.toTextArea http://localhost/~pastakhov/w/extensions/CodeMirror/resources/lib/codemirror/lib/codemirror.js:5965:9
	switchCodeMirror http://localhost/~pastakhov/w/extensions/CodeMirror/resources/ext.CodeMirror.js:303:4
	addCodeMirrorToWikiEditor/<.groups.codemirror.tools.CodeMirror.action.execute http://localhost/~pastakhov/w/extensions/CodeMirror/resources/ext.CodeMirror.js:234:13
	$.wikiEditor.modules.toolbar.fn.doAction http://localhost/~pastakhov/w/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js:263:6
	$.wikiEditor.modules.toolbar.fn.buildTool/< http://localhost/~pastakhov/w/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js:352:8
	jQuery.event.dispatch http://localhost/~pastakhov/w/load.php:4669:15
	jQuery.event.add/elemData.handle http://localhost/~pastakhov/w/load.php:4338:6

Second is hard to replay...

Aklapper renamed this task from Sometimes Enable/Disable button is broken to Sometimes Enable/Disable button is broken: "Node was not found in codemirror.js:5965".Feb 22 2017, 1:00 PM

Hi Pastakhov: we have similar problem on our test wiki which we have just upgraded to 1.28: logged out all is ok, when logged in you do not longer see the button to turn it off or on.

moreover when logged out, the button does not longer change to the black/white color.

If you want to test it on your own in our instances, modify your hosts to use wiki.documentfoundation.org:443:89.238.68.189 or change your resolver. ;-)

Pastakhov claimed this task.