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 updated the task description. (Show Details)
Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova added a subscriber: Etonkovidova.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 5 2016, 7:47 PM
Etonkovidova triaged this task as High priority.Apr 18 2016, 10:12 PM

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 5:15 PM
Etonkovidova added a comment.EditedJul 18 2016, 11:11 PM

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

Deskana closed this task as Resolved.May 14 2018, 1:04 PM