Page MenuHomePhabricator

Exception when switching from mobile VE to wikitext: "Uncaught TypeError: e is not a constructor"
Closed, ResolvedPublic

Description

Exception when switching from mobile VE to wikitext:

Uncaught TypeError: e is not a constructor
    at r.switchToSourceEditor (VisualEditorOverlay.js:162)
    at s.editSource (ve.init.mw.MobileFrontendArticleTarget.js:239)
    at VeUiMWEditModeSourceTool.ve.ui.MWEditModeSourceTool.switch (ve.ui.MWEditModeTool.js?6fc55:60)
    at VeUiMWEditModeSourceTool.mw.libs.ve.MWEditModeTool.onSelect (ve.init.MWEditModeTool.js?8a9ee:80)
    at OoUiListToolGroup.OO.ui.ToolGroup.onMouseKeyUp (ToolGroup.js:240)
    at OoUiListToolGroup.OO.ui.PopupToolGroup.onMouseKeyUp (PopupToolGroup.js:151)
    at OoUiListToolGroup.OO.ui.ListToolGroup.onMouseKeyUp (ListToolGroup.js:204)
    at HTMLDivElement.dispatch (jquery.js?6a07d:5183)
    at HTMLDivElement.elemData.handle (jquery.js?6a07d:4991)

Event Timeline

Change 488395 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@master] EditorOverlay: Pass constructor of itself to VisualEditorOverlay, not instance

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

This will need to be backported to 1.33.0-wmf.16.

Change 488395 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] EditorOverlay: Pass constructor of itself to VisualEditorOverlay, not instance

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

Change 488492 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@wmf/1.33.0-wmf.16] EditorOverlay: Pass constructor of itself to VisualEditorOverlay, not instance

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

Change 488492 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@wmf/1.33.0-wmf.16] EditorOverlay: Pass constructor of itself to VisualEditorOverlay, not instance

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

Mentioned in SAL (#wikimedia-operations) [2019-02-06T17:39:59Z] <thcipriani@deploy1001> Synchronized php-1.33.0-wmf.16/extensions/MobileFrontend: SWAT: [[gerrit:488492|EditorOverlay: Pass constructor of itself to VisualEditorOverlay, not instance]] T215408 (duration: 00m 57s)

Jdlrobson triaged this task as Unbreak Now! priority.Feb 6 2019, 6:03 PM

Per SWAT

ppelberg closed this task as Resolved.EditedMar 1 2019, 11:11 PM
ppelberg subscribed.

This looks good.

Steps taken to test/confirm...

  1. In Chrome, navigate to https://en.m.wikipedia.org/wiki/Apache_Kafka
  2. Click edit
  3. Switch to mobile VE
  4. Exit editor (tap "X")
  5. View JavaScript Console
  6. Click edit
  7. Switch to mobile VE from wikitext
  8. ✅ "Uncaught TypeError: e is not a constructor" not visible in JavaScript Console.