getRange is null => adding citation fails
Closed, DuplicatePublic

Description

When trying to add reference using citation I get:

TypeError: this.getRange(...) is null
ve.dm.LinearSelection.prototype.equals()
 ve.dm.LinearSelection.js:128
ve.dm.SurfaceFragment.prototype.update()
 ve.dm.SurfaceFragment.js:93
ve.dm.SurfaceFragment.prototype.change()
 ve.dm.SurfaceFragment.js:129
ve.dm.SurfaceFragment.prototype.insertContent()
 ve.dm.SurfaceFragment.js:773
ve.dm.MWTransclusionModel.prototype.insertTransclusionNode()
 ve.dm.MWTransclusionModel.js:56
ve.ui.CiteFromIdInspector.prototype.onPreviewSelectWidgetChoose()
 ve.ui.CiteFromIdInspector.js:339
oo.EventEmitter.prototype.emit()
 oojs.jquery.js:775
ve.ui.CiteFromIdGroupWidget.prototype.onItemInsert()
 ve.ui.CiteFromIdGroupWidget.js:40
oo.EventEmitter.prototype.emit()
 oojs.jquery.js:775
oo.EventEmitter.prototype.emit()
 oojs.jquery.js:775
ve.ui.CiteFromIdReferenceWidget.prototype.onInsertButtonClick()
 ve.ui.CiteFromIdReferenceWidget.js:114
oo.EventEmitter.prototype.emit()
 oojs.jquery.js:775
OO.ui.mixin.ButtonElement.prototype.onClick()
 oojs-ui-core.js:1921
jQuery.event.dispatch()
 load.php:4669
jQuery.event.add/elemData.handle()
 load.php:4338

How to reproduce:

  1. https://he.wikipedia.org/w/index.php?title=%D7%A7%D7%AA%D7%A8%D7%99%D7%9F_%D7%90%D7%99%D7%91%D7%A8%D7%92%D7%95%D7%90%D7%9F&veaction=edit
  2. Add citation for http://www.iaaf.org/athletes/colombia/caterine-ibarguen-170921#biography
  3. (Open your console) Insert

(I would usually go to debug=1 to give some more details, but I consider debug=1 as broken as it loads tons of modules individually and it takes too long to be used for quick debugging...)