Page MenuHomePhabricator

Console error - 'Error: View mediainfoview does not exist' on Commons File pages
Open, Needs TriagePublicPRODUCTION ERROR

Description

Steps to reproduce:

  1. On commons wmf.6 go to any page in File namespace and open the dev tools Console.
  2. The Console will display the following error (you may reload a page):
Error: View mediainfoview does not exist
at SELF._getView
at SELF.getEntityView
Error
message
View mediainfoview does not exist
trace
resources/wikibase/view/ViewFactory.js/SELF.prototype._getView@https://commons.wikimedia.org/w/load.php?debug=1&lang=en&modules=dataValues%2Cjquery%2Coojs%2Coojs-router%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ccookie%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%2Cicon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:43869:10
resources/wikibase/view/ViewFactory.js/SELF.prototype.getEntityView@https://commons.wikimedia.org/w/load.php?debug=1&lang=en&modules=dataValues%2Cjquery%2Coojs%2Coojs-router%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ccookie%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%2Cicon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:43386:15
repo/resources/wikibase.ui.entityViewInit.js/createEntityView/<@https://commons.wikimedia.org/w/load.php?debug=1&lang=en&modules=dataValues%2Cjquery%2Coojs%2Coojs-router%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ccookie%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%2Cicon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:39392:29
mightThrow@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3766:29
Deferred/then/resolve/</process<@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3834:12
setTimeout handler*Deferred/then/resolve/<@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3872:16
fire@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3500:31
add@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3559:7
Deferred/then/<@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3892:24
Deferred@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3983:9
then@https://commons.wikimedia.org/w/resources/lib/jquery/jquery.js?7e265:3877:20
createEntityView@https://commons.wikimedia.org/w/load.php?debug=1&lang=en&modules=dataValues%2Cjquery%2Coojs%2Coojs-router%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.ec
Impact
  • SDC still seems to work.
Notes

Details

Request URL
https://commons.wikimedia.org/wiki/File:Hochfeiler_in_Alps.jpg?debug=1
Related Changes in Gerrit:

Event Timeline

This is still an issue on Commons. To help understand impact: it's not just a js error in production, but it also prevents my port of Twinkle from working on filepages on Commons. See also T332305.

https://commons.wikimedia.org/wiki/File:Hochfeiler_in_Alps.jpg?debug=1

Error
View mediainfoview does not exist

@resources/wikibase/view/ViewFactory.js/SELF.prototype._getView

Impact:

  • SDC still seems to work.
  • The ImageAnnotator gadget doesn’t work on the same page, but this is probably unrelated, as the error appears on other pages as well, where ImageAnnotator does work.
Tacsipacsi changed the subtype of this task from "Task" to "Production Error".Mar 18 2023, 8:56 PM
Tacsipacsi set Request URL to https://commons.wikimedia.org/wiki/File:Hochfeiler_in_Alps.jpg?debug=1.
Tacsipacsi updated the task description. (Show Details)

I currently get this error on every single File page on Commons. Doesn't matter if I'm logged in or not. Both in Firefox and Chromium. I even disabled all browser add-ons, e.g. ad blockers. Still the same error.

Error: View mediainfoview does not exist
    at SELF._getView (load.php?debug=1&lang=en&modules=codex-search-styles%2CdataValues%2Cjquery%2Coojs%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cpulsatingdot%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbEnableMulLanguageCode%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%2CwbTmpAlwaysShowMulLanguageCode%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:45918:10)
    at SELF.getEntityView (load.php?debug=1&lang=en&modules=codex-search-styles%2CdataValues%2Cjquery%2Coojs%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cpulsatingdot%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbEnableMulLanguageCode%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%2CwbTmpAlwaysShowMulLanguageCode%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:45435:15)
    at load.php?debug=1&lang=en&modules=codex-search-styles%2CdataValues%2Cjquery%2Coojs%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%2CvalueFormatters%2CvalueParsers%2Cwikibase%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.echo.centralauth%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Ci18n%2Cinterface%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery.animateWithEvent%2Cclient%2Ci18n%2Cinputautoexpand%2Cspinner%2CtextSelection%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.spinner.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.wikibase.entityselector%2Cwbtooltip%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cpulsatingdot%2Crouter%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.action.edit.editWarning%7Cmediawiki.action.view.metadata%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.button%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cmw.config.values.wbDataTypes%2CwbEnableMulLanguageCode%2CwbRefTabsEnabled%2CwbRepo%2CwbSiteDetails%2CwbTmpAlwaysShowMulLanguageCode%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-editing-core%2Cicons-interactions%2Cicons-location%2Cicons-movement%2Cindicators%7Cskins.vector.legacy.js%7Cutil.ContentLanguages%2CExtendable%2CMessageProvider%2CMessageProviders%2CNotifier%2ChighlightSubstring%2Cinherit%7CvalueParsers.ValueParserStore%2Cparsers%7Cwikibase.EntityInitializer%2CSite%2CWikibaseContentLanguages%2CbuildErrorOutput%2Cdatamodel%2CgetLanguageNameByCode%2CgetUserLanguages%2Cserialization%2Csites%2Ctemplates%7Cwikibase.api.RepoApi%2CValueCaller%7Cwikibase.entityChangers.EntityChangersFactory%7Cwikibase.entityPage.entityLoaded%7Cwikibase.experts.Entity%2CItem%2CProperty%2C__namespace%2Cmodules%7Cwikibase.formatters.ApiValueFormatter%7Cwikibase.mediainfo.base%2CfilePageDisplay%2Cstatements%2Culs%7Cwikibase.ui.entityViewInit%7Cwikibase.utilities.ClaimGuidGenerator%7Cwikibase.view.ControllerViewFactory%2CReadModeViewFactory%2C__namespace&skin=vector&version=ztntf:41441:29
    at mightThrow (jquery.js?7e265:3766:29)
    at process (jquery.js?7e265:3834:12)

As far as I can tell this is the reason several other user scripts and gadgets that interact with the StructuredDataOnCommons tab are broken as well.

The piece of code that fails turns out to be part of the good old Wikidata entity page UI that's build with jQuery UI. See https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/repo/resources/wikibase.ui.entityViewInit.js$357. The thing is: This UI is not used on Commons file pages. This code should never be called, as far as I can tell. Why is it?

thiemowmde renamed this task from [commons-wmf.6] Console error - 'Error: View mediainfoview does not exist' on File pages to Console error - 'Error: View mediainfoview does not exist' on Commons File pages.Jul 21 2023, 10:02 AM

Right so wikibase.ui.entityViewInit is included on these pages. It runs createEntityView() on this page, which in turn has this marked as entityNamespace = "mediainfo" and that then attempts to create the mediainfoview, which doesn't exist and thus fails.

Object.keys( mw.loader.moduleRegistry ).filter( module => { return mw.loader.moduleRegistry[module].dependencies.includes( 'wikibase.ui.entityViewInit' ) } );

It seems that it is not a dependency of another module, so it must have been included deliberately from the php side. The only place that seems to add this module is
WikiBase's includes/ParserOutput/FullEntityParserOutputGenerator.php

There was some work done on this section in T324991, perhaps that might be related ?

Is this still happening? I can’t reproduce it on this random file page, neither on desktop nor mobile, neither with nor without ?safemode=1.

I’m able to reproduce this on https://commons.wikimedia.org/wiki/File:Dia_do_Aviador_(50535075482).jpg, with and without safe mode, with plain F5 and with ⌃+F5. I can also reproduce at the URL set in the Request URL field. (All testing done logged-out, because on this machine, I’m only logged in to my LDAP account, not to SUL.)

Still happening, got it on https://commons.wikimedia.org/wiki/File:MediaWiki_1.41.0_database_schema.png just now.

Error: View mediainfoview does not exist
    _getView ViewFactory.js:702
    getEntityView ViewFactory.js:219
    createEntityView wikibase.ui.entityViewInit.js:146
    …
    createEntityView wikibase.ui.entityViewInit.js:139
    js wikibase.ui.entityViewInit.js:410

Any new insights? If createEntityView in wikibase.ui.entityViewInit.js shall not be called from commonswiki, maybe we should simply return from this function if mw.config.get('wgWikiID') === 'commonswiki' && mw.config.get( 'wgCanonicalNamespace' ) === 'File'

Yeah, this is a hack, but maybe better than the JS error?

Can reproduce also in 2025, even from an anonymous tab, on https://commons.wikimedia.org/wiki/File:De_eerste_regen_voor_kinderen_in_Bignona_Senegal.webm

Stack trace (that changed a bit after the last report)

Error: View mediainfoview does not exist
    _getView ViewFactory.js:692
    getEntityView ViewFactory.js:219
    createEntityView wikibase.ui.entityViewInit.js:146
    mightThrow jQuery
jquery.js:3489:28
    jQuery 32
    createEntityView wikibase.ui.entityViewInit.js:139
    js wikibase.ui.entityViewInit.js:410

I can easily reproduce this error as well. Come on, it's been occurring since 2022!

TheDJ's comment (T321532#9033875) seems to be on the right track.

I also have a strong suspicion that it's related to the following section in FullEntityParserOutputGenerator.php#181:

// T324991
if ( !$this->isMobileView ) {
	// make sure required client-side resources will be loaded
	// FIXME: Separate the JavaScript that is also needed in read-only mode from
	// the JavaScript that is only necessary for editing.
	$parserOutput->addModules( [
		'wikibase.ui.entityViewInit',
	] );
}

Indeed, I consistently encounter the error on the desktop site when viewing pages. However, I do not experience it on the mobile site (where the module is not loaded) or in edit mode on the desktop site (where the module is loaded and the error does not occur).

Seeing this on both beta cluster and production.

The problem seems to be here:

	mw.hook( 'wikipage.content' ).add( () => {
		// This is copied from startup.js in MediaWiki core.
		var mwPerformance = window.performance && performance.mark ? performance : {
			mark: function () {}
		};
		mwPerformance.mark( 'wbInitStart' );

		var $entityview = $( '.wikibase-entityview' );
		var canEdit = isEditable();

		wb.EntityInitializer.newFromEntityLoadedHook().getEntity().then( ( entity ) => {...} ).catch( mw.log.error );

		if ( canEdit ) {
			$entityview
			.on( 'entitytermsviewchange entitytermsviewafterstopediting', ( event, lang ) => {...} );
		}
	} );

Correct me if I'm wrong but there seem to be no point in going any further when $( '.wikibase-entityview' ) is empty. So if (!$entityview.length) return; should be fine.

obraz.png (839×173 px, 21 KB)

Bug is in console when visiting:
https://commons.wikimedia.org/wiki/File:Crimestoppers_10th_anniversary_at_Government_House_2019.jpg?debug=1

Seems like both of this is only available on Wikidata item page like https://www.wikidata.org/wiki/Q139906870

$( '.wikibase-entityview' ) // → Object { 0: div#wb-item-Q139906870.wikibase-entityview.wb-item, length: 1, prevObject: {…} }
mw.config.get( 'wbIsEditView' ) // → true

File to fix:
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/5d4c27190017c68cf52bf25a9077fb22289aa792/repo/resources/wikibase.ui.entityViewInit.js

First, a big thank you to @Nux for finally pointing us toward a resolution — this bug has been open since October 2022, and the proposed guard is the clearest path forward anyone has laid out.

Bug Analysis

The error chain is straightforward once you see it:

  1. wikibase.ui.entityViewInit is loaded on desktop Commons File pages (via FullEntityParserOutputGenerator.php)
  2. Its wikipage.content hook fires and calls createEntityView(entity, $entityview.first())
  3. On a Commons File page, $('.wikibase-entityview') is empty — that element only exists on Wikidata item/property pages
  4. createEntityView proceeds anyway, and deep inside ViewFactory._getView it tries to instantiate mediainfoview, which isn't registered in the standard ViewFactory — hence the error

Root Cause

wikibase.ui.entityViewInit is being loaded on pages where it has nothing to act on. The module guards against mobile (in PHP) but not against pages where .wikibase-entityview simply doesn't exist in the DOM.

Fix

Immediate fix (JS guard)

In wikibase.ui.entityViewInit.js, inside the mw.hook('wikipage.content').add(...) callback, add an early return after the $entityview selection:

mw.hook( 'wikipage.content' ).add( () => {
    var mwPerformance = window.performance && performance.mark ? performance : {
        mark: function () {}
    };
    mwPerformance.mark( 'wbInitStart' );

    var $entityview = $( '.wikibase-entityview' );

    // No entity view in the DOM — nothing to initialize (e.g. Commons File pages).
    // This module should not have been loaded here; if you see this warning,
    // it likely indicates a misconfiguration or regression in module loading.
    if ( !$entityview.length ) {
        mw.log.warn( 'wikibase.ui.entityViewInit loaded on a page without .wikibase-entityview — this module should not have been loaded here.' );
        return;
    }

    var canEdit = isEditable();
    // ... rest of the hook

This is safe because:

  • On a real Wikidata entity page, .wikibase-entityview is always present
  • On Commons File pages it's absent, so the hook exits cleanly before trying to resolve a view type that doesn't exist in that context
  • The canEdit block below also references $entityview, so it's protected by the same guard

Using mw.log.warn rather than a silent return is intentional: it suppresses the breaking JS error for end users while keeping the problem visible to developers in the console. This way the guard does not silently hide a potential underlying issue.

Deeper fix (PHP-level, via hook)

The module wikibase.ui.entityViewInit simply shouldn't be loaded on MediaInfo pages at all. The right mechanism is a hook in FullEntityParserOutputGenerator::addModules() that lets extensions opt out:

private function addModules( ParserOutput $parserOutput, EntityDocument $entity ): void {
    // ...existing module additions...

    // T324991 / T321532
    if ( !$this->isMobileView ) {
        $parserOutput->addModuleStyles( [
            'wikibase.desktop',
            'jquery.wikibase.toolbar.styles',
        ] );

        $entityViewInitModules = [ 'wikibase.ui.entityViewInit' ];

        // Allow extensions to remove modules not applicable to their entity types
        // (e.g. WikibaseMediaInfo: no .wikibase-entityview element on File pages)
        $this->hookRunner->onWikibaseRepoEntityViewModules( $entity, $entityViewInitModules );

        if ( $entityViewInitModules ) {
            $parserOutput->addModules( $entityViewInitModules );
        }
    }
}

WikibaseMediaInfo then hooks in and removes the module for its entity type:

// In WikibaseMediaInfo's HookHandlers
public function onWikibaseRepoEntityViewModules( EntityDocument $entity, array &$modules ): void {
    if ( $entity->getType() === MediaInfo::ENTITY_TYPE ) {
        $modules = array_diff( $modules, [ 'wikibase.ui.entityViewInit' ] );
    }
}

This keeps Wikibase core unaware of WikibaseMediaInfo, follows MediaWiki hook conventions, and is future-proof for any other extension that provides its own entity type with its own UI initialization.

Once the deeper fix is in place and validated, the mw.log.warn guard remains valuable as a permanent safety net: it costs nothing in normal operation, and would immediately surface any future regression where the module ends up loaded on the wrong page.

Why does the deeper fix need a hook – why does that code run at all on Commons file pages? Since Commons file pages work pretty differently, couldn’t the whole FullEntityParserOutputGenerator be skipped on them?

Fair point, and longer-term that's probably the cleaner direction. But FullEntityParserOutputGenerator does more than bootstrap that JS — it also generates the title HTML, alternate links, and statement data updaters (image links, geo data, etc.), plus the actual SDC HTML via DispatchingEntityViewFactory, which already dispatches to MediaInfo's own views. All of that is needed on File pages.

The only real mismatch is the unconditional addModules() call adding wikibase.ui.entityViewInit, which assumes markup MediaInfo doesn't have. Skipping the whole generator would mean duplicating or extracting all that shared logic elsewhere — a much bigger refactor than just scoping out one module.

Indeed, a hook might feel a bit heavy for that single line. Checking $entity->getType() directly before adding the module (similar to how isMobileView is already handled) would be simpler, unless we expect other entity types to need the same opt-out later.

Change #1348951 had a related patch set uploaded (by Simon04; author: Simon04):

[mediawiki/extensions/Wikibase@master] Don't fail on entity types without an entity view

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