Page MenuHomePhabricator

[Regression] new errors coming from visual editor
Closed, ResolvedPublic

Description

There are a few new errors in logstash, which seem to be related to recent Cite-VE patches:

Example stack traces:

TypeError: Cannot read properties of null (reading 'getAttribute')
	
at ve.ce.MWReferencesListNode.onInternalListUpdate  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.cite.visualEditor.core&skin=vector-2022&version=3phvt:31:994
at OO.EventEmitter.emit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at ve.dm.InternalList.onTransact  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:96:622
at OO.EventEmitter.emit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at ve.dm.Document.commit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:246:923
at ve.dm.Surface.changeInternal  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:203:1
at ve.dm.Surface.popStaging  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:193:646
at eval  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.citoid.visualEditor&skin=vector-2022&version=1e01n:31:549
at eval  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs-ui-windows&skin=vector-2022&version=18lli:6:943
at OO.ui.Process.execute  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs-ui-windows&skin=vector-2022&version=18lli:7:619
TypeError: Cannot read properties of null (reading 'getInternalList')
	
at ve.ce.MWReferencesListNode.onTeardown  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.cite.visualEditor.core&skin=vector-2022&version=3phvt:31:693
at OO.EventEmitter.emit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at ve.ce.View.setLive  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:460:718
at https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:471:127
at ve.ce.BranchNode.onSplice  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:471:24
at OO.EventEmitter.emit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at ve.dm.BranchNode.splice  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:85:229
at ve.batchSplice  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core.utils&skin=vector-2022&version=1d3dw:2:618
at ve.dm.Document.rebuildTree  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=zd2o3:260:83

Event Timeline

I haven't reproduced the exact issue yet, but I can cause all manner of related errors.

Steps:

  • Begin creating a blank page in the visual editor.
  • Add a reference.
  • Switch to the wikitext editor.
  • Switch back to VE
  • Delete the reflist (not the ref).
Uncaught TypeError: this.getModel().getDocument() is null
    onTeardown ve.ce.MWReferencesListNode.js:107

Change #1073731 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] [bugfix] Guard against out-of-order destruction

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

Change #1073731 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] [bugfix] Guard against out-of-order destruction

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

Tobi_WMDE_SW claimed this task.