Page MenuHomePhabricator

"Exception: ve.init is undefined" / "TypeError: Cannot read property 'target' of undefined" when opening classic wikitext editor
Closed, ResolvedPublic

Description

Split off from T228594:

https://en.wikisource.org/w/index.php?title=Page:Mexico_under_Carranza.djvu/95&action=edit&debug=true Open this, or any other page in edit mode.

The following are the error messages (5) in the debug console generated by activating the OCR:

Exception: ve.init is undefined 
mw.libs.ve.EditingTabDialog.prototype.getSetupProcess/<@https://en.wikisource.org/w/load.php?lang=en&modules=ext.visualEditor.switching%7Coojs-ui%7Coojs-ui.styles.icons-accessibility&skin=vector&version=0wrn2bo:4:376
proceed/<@https://en.wikisource.org/w/load.php?lang=en&modules=ext.CodeMirror%2CTemplateWizard%2Ccharinsert%2CeventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.CodeMirror.data%7Cext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.echo.api%2Cinit%7Cext.proofreadpage.icons%7Cext.proofreadpage.page.edit%2Cnavigation%7Cext.proofreadpage.ve.pageTarget.init%7Cext.uls.common%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.progressBarWidget%2CsupportCheck%2CtargetLoader%2CtempWikitextEditorWidget%2Ctrack%2Cve%7Cext.wikimediaEvents.loggedin%7Cjquery%2Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Cjquery.accessKeyLabel%2CcheckboxShiftClick%2Cclient%2Ccookie%2CgetAttrs%2ChighlightText%2ClengthLimit%2CmakeCollapsible%2Cmousewheel%2CprpZoom%2Csuggestions%2CtabIndex%2CtextSelection%2Cthrottle-debounce%7Cjquery.makeCollapsible.styles%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CRegExp%2CString%2CTitle%2CUpload%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2Cicon%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.action.edit%7Cmediawiki.action.edit.collapsibleFooter%7Cmediawiki.language.specialCharacters%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategoryMultiselectWidget%2CDateInputWidget%2CStashedFileWidget%2CUserInputWidget%2CvisibleLengthLimit%7Cmediawiki.widgets.DateInputWidget.styles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-citation%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-interactions%2Cicons-media%2Cicons-movement%7Cskins.vector.js%7Cuser.defaults%7Cwikibase.client.action.edit.collapsibleFooter&skin=vector&version=0as2p6p:712:96
mightThrow@https://en.wikisource.org/w/load.php?lang=en&modules=ext.CodeMirror%2CTemplateWizard%2Ccharinsert%2CeventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.CodeMirror.data%7Cext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.echo.api%2Cinit%7Cext.proofreadpage.icons%7Cext.proofreadpage.page.edit%2Cnavigation%7Cext.proofreadpage.ve.pageTarget.init%7Cext.uls.common%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.progressBarWidget%2CsupportCheck%2CtargetLoader%2CtempWikitextEditorWidget%2Ctrack%2Cve%7Cext.wikimediaEvents.loggedin%7Cjquery%2Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Cjquery.accessKeyLabel%2CcheckboxShiftClick%2Cclient%2Ccookie%2CgetAttrs%2ChighlightText%2ClengthLimit%2CmakeCollapsible%2Cmousewheel%2CprpZoom%2Csuggestions%2CtabIndex%2CtextSelection%2Cthrottle-debounce%7Cjquery.makeCollapsible.styles%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CRegExp%2CString%2CTitle%2CUpload%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2Cicon%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.action.edit%7Cmediawiki.action.edit.collapsibleFooter%7Cmediawiki.language.specialCharacters%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategoryMultiselectWidget%2CDateInputWidget%2CStashedFileWidget%2CUserInputWidget%2CvisibleLengthLimit%7Cmediawiki.widgets.DateInputWidget.styles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-citation%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-interactions%2Cicons-media%2Cicons-movement%7Cskins.vector.js%7Cuser.defaults%7Cwikibase.client.action.edit.collapsibleFooter&skin=vector&version=0as2p6p:223:916
resolve/</process<@https://en.wikisource.org/w/load.php?lang=en&modules=ext.CodeMirror%2CTemplateWizard%2Ccharinsert%2CeventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.CodeMirror.data%7Cext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.echo.api%2Cinit%7Cext.proofreadpage.icons%7Cext.proofreadpage.page.edit%2Cnavigation%7Cext.proofreadpage.ve.pageTarget.init%7Cext.uls.common%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.progressBarWidget%2CsupportCheck%2CtargetLoader%2CtempWikitextEditorWidget%2Ctrack%2Cve%7Cext.wikimediaEvents.loggedin%7Cjquery%2Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Cjquery.accessKeyLabel%2CcheckboxShiftClick%2Cclient%2Ccookie%2CgetAttrs%2ChighlightText%2ClengthLimit%2CmakeCollapsible%2Cmousewheel%2CprpZoom%2Csuggestions%2CtabIndex%2CtextSelection%2Cthrottle-debounce%7Cjquery.makeCollapsible.styles%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CRegExp%2CString%2CTitle%2CUpload%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2Cicon%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.action.edit%7Cmediawiki.action.edit.collapsibleFooter%7Cmediawiki.language.specialCharacters%7Cmediawiki.legacy.wikibits%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategoryMultiselectWidget%2CDateInputWidget%2CStashedFileWidget%2CUserInputWidget%2CvisibleLengthLimit%7Cmediawiki.widgets.DateInputWidget.styles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-citation%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-interactions%2Cicons-media%2Cicons-movement%7Cskins.vector.js%7Cuser.defaults%7Cwikibase.client.action.edit.collapsibleFooter&skin=vector&version=0as2p6p:224:589
 undefined 2 load.php:226:749

Event Timeline

matmarex created this task.Jul 22 2019, 6:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 22 2019, 6:27 PM

As a result of the error, this dialog to choose your preferred editor doesn't appear in source mode:

matmarex renamed this task from "Exception: ve.init is undefined" when opening classic wikitext editor to "Exception: ve.init is undefined" / "TypeError: Cannot read property 'target' of undefined" when opening classic wikitext editor.Jul 22 2019, 6:33 PM

Change 524910 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] MWEditingTabDialog: Don't use ve.init.target because it may not be loaded

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

Change 524912 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Enforce that some files must not depend on the ve global

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

Change 524910 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] MWEditingTabDialog: Don't use ve.init.target because it may not be loaded

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

This patch fixes the issue, the second patch is only hardening to make it impossible for us to cause the same bug again.

Ineuw added a subscriber: Ineuw.Jul 25 2019, 3:30 AM
ppelberg closed this task as Resolved.Sep 3 2019, 12:03 AM
ppelberg claimed this task.

Change 524912 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Enforce that some files must not use the ve global

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