Page MenuHomePhabricator

[Regression pre-wmf.12] Automatic insertion of citation and inserting math function is failing with error "Cannot read property 'internal' of null" from ve.dm.Node#cloneElement
Closed, ResolvedPublic1 Story Points

Description

Automatic insertion of citation is failing with error "Cannot read property 'internal' of null"

Details

Related Gerrit Patches:
VisualEditor/VisualEditor : masterThrow exceptions when trying to access element of DocumentNode
mediawiki/extensions/VisualEditor : masterFix preview to use a valid document slice
mediawiki/extensions/Citoid : masterFix reference preview to use a valid document

Event Timeline

Ryasmeen created this task.Jul 25 2016, 8:55 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 25 2016, 8:55 PM
Ryasmeen renamed this task from [Regression pre-wmf.12] Automatic insertion of citation is failing with error "Cannot read property 'internal' of null" to [Regression pre-wmf.12] Automatic insertion of citation and inserting math function is failing with error "Cannot read property 'internal' of null".Jul 25 2016, 10:08 PM
Jdforrester-WMF renamed this task from [Regression pre-wmf.12] Automatic insertion of citation and inserting math function is failing with error "Cannot read property 'internal' of null" to [Regression pre-wmf.12] Automatic insertion of citation and inserting math function is failing with error "Cannot read property 'internal' of null" from ve.dm.Node#cloneElement.Jul 25 2016, 10:24 PM
Jdforrester-WMF triaged this task as Unbreak Now! priority.
Restricted Application added subscribers: Luke081515, TerraCodes. · View Herald TranscriptJul 25 2016, 10:24 PM

OK, so #cloneElement is getting called with null somehow. It should probably return nicely rather than die horribly.

Stack:

  • ve.ui.PreviewElement#replaceWithModelDom
  • ve.dm.Converter#getDomFromNode
  • ve.dm.Document#shallowCloneFromRange
  • ve.dm.Node#getClonedElement

Change 301130 had a related patch set uploaded (by Esanders):
Fix reference preview to use a valid document

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

Change 301133 had a related patch set uploaded (by Esanders):
Fix preview to use a valid document slice

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

Change 301130 merged by jenkins-bot:
Fix reference preview to use a valid document

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

Change 301133 merged by jenkins-bot:
Fix preview to use a valid document slice

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

Jdforrester-WMF closed this task as Resolved.Jul 26 2016, 4:07 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF set the point value for this task to 1.

OK, so #cloneElement is getting called with null somehow. It should probably return nicely rather than die horribly.

It's being called on the documentNode, which doesn't exist in the linear model.

Change 301582 had a related patch set uploaded (by Esanders):
Throw exceptions when trying to access element of DocumentNode

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

Change 301582 merged by jenkins-bot:
Throw exceptions when trying to access element of DocumentNode

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