Description:
Logstash is reporting about ~100+ TypeErrors when a user tries to interact with the media viewer or images in general on wiki pages. The error message "TypeError: isMediaViewerEnabledOnClick is not a function" suggests that there might be a bad reference.
Sample Error Log
Timestamp: February 21, 2024, at 20:54:43.614 UTC Error Type: TypeError Error Message: isMediaViewerEnabledOnClick is not a function File URL: https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.centralauth.ForeignApi%7Cext.uls.languagenames%7Cjquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.ForeignApi.core%7Cmediawiki.base%7Cmediawiki.page.ready%7Cmmv.bootstrap%7Cmw.config.values.wbSiteDetails%7Coojs-ui-core.icons%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%7Cwikibase.WikibaseContentLanguages%2CgetLanguageNameByCode%2CgetUserLanguages%7Cwikibase.mediainfo.filePageDisplay%2Cstatements%7Cwikibase.view.ControllerViewFactory&skin=vector&version=r7vfx URL: https://commons.wikimedia.org/wiki/File:Albert_Anker_Lesender_Mann.jpg
Steps to Reproduce:
- Visit the Wikimedia Commons page for the image "Albert Anker Lesender Mann" using the following URL: https://commons.wikimedia.org/wiki/File:Albert_Anker_Lesender_Mann.jpg
- Attempt to interact with the media viewer or related elements on the page.
Expected Behavior:
Users should be able to interact with the media viewer and related elements without encountering errors.
Actual Behavior:
Encountering a TypeError with the message "isMediaViewerEnabledOnClick is not a function" might prevent readers from interacting with the media viewer or images.
Resolution:
- Investigate the JavaScript code responsible specifically related to the media viewer functionality.
- Ensure that the isMediaViewerEnabledOnClick function is correctly implemented and available for use.