Page MenuHomePhabricator

VE freezes when trying to insert a reference with "Cannot read property 'getDataFromNode' of null"
Closed, DeclinedPublic

Description

  1. Go to https://www.mediawiki.org/wiki/Wikimedia_Audiences?veaction=edit&action=edit
  2. Place the cursor at the top of the page and click "Insert" -> "More" -> "Basic reference"
  3. Type some dummy text into the "Write or past your reference here..." field
  4. Click "Insert"

Result: Nothing happens, VE gets stuck indefinitely with the dialog box still open (and the progress animation with the diagonal bars running), with the below error message shown in the console. Clicking "Cancel" does nothing either. Any other changes already made to the page before trying to insert the footnote are lost.

(This is a translatable page and VE shows a note that editing these is not yet officially supported; but even so, a more graceful fail would be highly preferable.)

Uncaught TypeError: Cannot read property 'getDataFromNode' of null
    at VeCeTextNode.ve.ce.TextNode.getAnnotatedHtml (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:784)
    at VeCeParagraphNode.ve.ce.ContentBranchNode.getRenderedContents (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:625)
    at VeCeParagraphNode.ve.ce.ContentBranchNode.renderContents (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:628)
    at VeCeParagraphNode.ve.ce.ContentBranchNode.onSplice (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:623)
    at VeDmParagraphNode.oo.EventEmitter.emit (<anonymous>:8:445)
    at VeDmParagraphNode.ve.dm.BranchNode.splice (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:324)
    at VeDmTreeModifier.ve.dm.TreeModifier.removeNode (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:399)
    at VeDmTreeModifier.ve.dm.TreeModifier.removeLast (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:405)
    at VeDmTreeModifier.ve.dm.TreeModifier.processRemove (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:403)
    at VeDmTreeModifier.ve.dm.TreeModifier.processOperation (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:396)
    at VeDmTreeModifier.ve.dm.TreeModifier.process (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:395)
    at VeDmTransactionProcessor.ve.dm.TransactionProcessor.process (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:346)
    at VeDmDocument.ve.dm.Document.commit (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:456)
    at VeDmSurface.ve.dm.Surface.changeInternal (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:421)
    at VeDmSurface.ve.dm.Surface.change (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=17nx4eq:420)
    at VeDmMWReferenceModel.ve.dm.MWReferenceModel.updateInternalItem (<anonymous>:600:528)
    at VeUiMWReferenceDialog.<anonymous> (<anonymous>:641:165)
    at <anonymous>:43:113
    at OO.ui.Process.execute (<anonymous>:43:760)
    at VeUiMWReferenceDialog.OO.ui.Dialog.executeAction (<anonymous>:65:422)
    at VeUiMWReferenceDialog.OO.ui.ProcessDialog.executeAction (<anonymous>:73:426)
    at VeUiMWReferenceDialog.OO.ui.Dialog.onActionClick (<anonymous>:63:470)
    at OoUiActionSet.oo.EventEmitter.emit (<anonymous>:8:445)
    at OoUiActionWidget.oo.EventEmitter.emit (<anonymous>:8:445)
    at OoUiActionWidget.OO.ui.mixin.ButtonElement.onClick (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=02k9fi5:25)
    at HTMLAnchorElement.dispatch (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=0b7sr5a:69)
    at HTMLAnchorElement.elemData.handle (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=0b7sr5a:66)

Event Timeline

Deskana changed the task status from Open to Stalled.Sep 20 2017, 11:08 AM
Deskana subscribed.

@Tbayer I can't reproduce this problem. I managed to successfully insert a dummy reference on to that page by following the steps you provided. Are there additional steps to reproduce the problem?

Screen Shot 2017-09-20 at 12.06.52.png (464×844 px, 34 KB)

@Deskana Thanks for looking into it! Strangely, it works fine for me too now. But I did reproduce it several times before filing this bug, in Firefox and Chromium under Ubuntu (up-to-date versions in each case), and on two consecutive days. (I should have mentioned that the quoted error message is from Chromium; IIRC I did not see an equivalent in the web console in Firefox, even though VE froze in the same way there.)

Maybe it has to do with the fact that the page has since been edited (by me)? And/or with the translation status - but I just marked the current version for translation (as translation administrator) and the bug did not reoccur either.

There is one clear difference to when I encountered the bug earlier: Back then, a code symbol (<>) appeared on the top of the editable area (above the "Tech header" template), before attempting to insert the reference; now I don't see this symbol any more when editing the page.

image.png (233×450 px, 8 KB)
reference got added just fine for me, so perhaps this is no longer an issue?

Nobody can reproduce anything, hence declining. Please reopen if anyone can reproduce.