Page MenuHomePhabricator

Link/Mention inspector: 'Uncaught Type Error' if the link inspector Edit is not explicitly closed/dismissed
Closed, ResolvedPublic

Description

First scenario:

  1. Type a phrase, then convert it to an external link.
  2. Save the post.
  3. Open the post for editing and click the previously inserted link to edit it.
  4. Without closing the link inspector, click on 'Save changes'.

It hangs, not responding to anything except refreshing the page.
The stack trace is unusually long:

Uncaught TypeError: Cannot read property 'focus' of undefinedve.ce.Surface.focus Uncaught TypeError: Cannot read property 'top' of undefined

Uncaught TypeError: Cannot read property 'ownerDocument' of undefined
Sizzle.contains
OO.ui.contains
ve.ce.Surface.showSelectionState
ve.ce.Surface.showModelSelection
ve.ce.Surface.onModelSelect
ve.ce.Surface.activate
(anonymous function)
(anonymous function)
fire
self.fireWith
deferred.(anonymous function)
(anonymous function)
fire
self.add
promise.always
OO.ui.WindowManager.closeWindow
OO.ui.WindowManager.removeWindows
OO.ui.WindowManager.clearWindows
OO.ui.WindowManager.destroy
ve.ui.LinearContext.destroy
ve.ui.Surface.destroy
ve.init.Target.clearSurfaces
ve.init.Target.destroy
mw.flow.ui.VisualEditorWidget.destroy
mw.flow.ui.EditorSwitcherWidget.destroy
mw.flow.ui.EditorWidget.destroy
mw.flow.ui.EditPostWidget.destroy
(anonymous function)
oo.EventEmitter.emit
(anonymous function)
(anonymous function)
fire
self.fireWith
(anonymous function)
fire
self.fireWith
deferred.(anonymous function)
fire
self.fireWith
(anonymous function)
fire
self.fireWith
(anonymous function)
deferred.(anonymous function)
(anonymous function)
fire
self.fireWith
done
callback

Scenario 2 (a milder case - it does not hang)

  1. Insert an external link - not word(s), just a link. Save.
  2. Re-open the post for editing - click on the link to edit.
  3. Without closing the link inspector - click on 'Save changes'

The following is displayed, but the post is saved and all windows are closed properly.

Uncaught TypeError: Cannot read property 'focus' of undefined
Uncaught TypeError: Cannot read property 'top' of undefined

Event Timeline

Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova updated the task description. (Show Details)
Etonkovidova subscribed.

Re-checked(Chrome)- the issue is still present in betalabs. The console also shows 414 (Request-URI Too Large) along with the previous errors.
Another screenshot for the broken Link inspector

Screen Shot 2016-04-18 at 3.08.56 PM.png (302×785 px, 34 KB)

Re-checked the scenarios
(1) scenario displays: Uncaught TypeError: Cannot read property 'ownerDocument' of undefined

(2) scenario displays: Uncaught TypeError: Cannot read property 'appendHighlights' of null

Additionally, inserting Mention and clicking to edit it and clicking on 'Save changes' without closing edit Mention inspector, gives the same error as in (2) scenario.

Etonkovidova renamed this task from Link inspector: 'Uncaught Type Error' if the link inspector Edit is not explicitly closed/dismissed to Link/Mention inspector: 'Uncaught Type Error' if the link inspector Edit is not explicitly closed/dismissed.Jul 18 2016, 11:13 PM

Re-checked - the issue is still present.

Change 429209 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] ce.Surface: Don't attempt to activate a disabled surface

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

Change 429209 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ce.Surface: Don't attempt to activate a disabled surface

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

Change 429526 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (e673ad6de)

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

Change 429526 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (e673ad6de)

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