Page MenuHomePhabricator

TypeError: $.collapsibleTabs.getSettings(...) is undefined from Vector skin
Open, Stalled, Needs TriagePublic

Description

When I access
https://pt.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Esplanada/propostas&curid=61666&action=history&debug=1
using Firefox 57.0 (64-bit), while logged in or unregistered, I always get the error

TypeError: $.collapsibleTabs.getSettings(...) is undefined [Learn More] collapsibleTabs.js:114:29
handleResize/< https://pt.wikipedia.org/w/skins/Vector/collapsibleTabs.js:114:29
each https://pt.wikipedia.org/w/load.php:362:10
handleResize https://pt.wikipedia.org/w/skins/Vector/collapsibleTabs.js:98:4

Clicking on the first link, it shows the line
https://github.com/wikimedia/mediawiki-skins-Vector/blob/8842f744ee49a69fce24d0b4e1116068f97755d3/collapsibleTabs.js#L114

On Chrome 62, it looks like this:

collapsibleTabs.js?0c860:115 Uncaught TypeError: Cannot read property 'expandedWidth' of undefined

at jQuery.fn.init.<anonymous> (collapsibleTabs.js?0c860:115)
at Function.each (load.php?debug=true&lang=pt&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=1b46sjy:362)
at handleResize (collapsibleTabs.js?0c860:98)

I believe there is some race condition and/or some missing dependency in the code (see e.g. rMW61d650befc58d4c5c9d82b3b0585e65c75766e9c).

See also

Event Timeline

He7d3r created this task.Sep 29 2017, 6:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 29 2017, 6:59 PM
He7d3r updated the task description. (Show Details)Sep 29 2017, 7:08 PM
He7d3r updated the task description. (Show Details)Oct 8 2017, 2:35 PM

Given the code in Vector/collapsibleTabs.js, I'm fairly certain that a race condition within the Vector skin code is not possible.

The only way getSettings can be missing, is if something else removes it after it was defined. I suspect that perhaps a gadget or user script might be modifying the jQuery object in ways that breaks it.

I am not able to reproduce it myself, but when I view https://pt.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Esplanada/propostas&curid=61666&action=history, I do get a different error:

(x) Uncaught TypeError: Cannot read property 'expandedWidth' of undefined
      at jQuery.fn.init.<anonymous>
      at Function.each
      at handleResize
(4) Uncaught TypeError: Cannot read property 'expandedWidth' of undefined
He7d3r updated the task description. (Show Details)Nov 18 2017, 1:13 AM

Hmm... I'm not sure why, but it has something to do with this code:
https://pt.wikipedia.org/wiki/MediaWiki:Common.js?diff=50508967
The problem disappears if I remove it.

Grr... It happened again, even after the code above was removed from local Common.js. Maybe it was due to a cached version of the script, because it didn't happen after reloading the page
https://pt.wikipedia.org/w/index.php?diff=50536783&oldid=50504506

{
	"errorMessage": "TypeError: $.collapsibleTabs.getSettings(...) is undefined",
	"url": "https://pt.wikipedia.org/w/load.php?debug=false&lang=pt&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CkvStoreMaintenance%2CstartUp%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.cite.a11y%7Cext.cx.campaigns.contributionsmenu%7Cext.cx.eventlogging%2Cmodel%7Cext.cx.widgets.callout%7Cext.echo.api%2Cinit%7Cext.eventLogging%2CnavigationTiming%2Cpopups%2Cthanks%2CwikimediaEvents%7Cext.eventLogging.subscriber%7Cext.popups.images%7Cext.thanks.revthank%7Cext.uls.common%2Ccompactlinks%2Ceventlogger%2Cinit%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.supportCheck%2CtargetLoader%2Ctrack%2Cve%7Cext.wikimediaEvents.loggedin%7Cjquery.accessKeyLabel%2CbyteLength%2CcheckboxShiftClick%2Cclient%2Cconfirmable%2Ccookie%2CgetAttrs%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Csuggestions%2CtabIndex%2CtextSelection%2Cthrottle-debounce%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CRegExp%2CTitle%2CUri%2Capi%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2CsearchSuggest%2Cstorage%2Ctemplate%2Ctoc%2Cuser%2Cutil%7Cmediawiki.ForeignApi.core%7Cmediawiki.api.options%2Cuser%2Cwatch%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cregexp%7Cmediawiki.ui.icon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Coojs%2Coojs-ui-core%2Coojs-ui-windows%2Csite%7Coojs-ui-core.styles%7Coojs-ui.styles.icons-alerts%2Cicons-content%2Cicons-interactions%2Cicons-movement%2Cindicators%2Ctextures%7Cschema.UniversalLanguageSelector%7Cskins.vector.js%7Cuser.defaults&skin=vector&version=0a9x3ml",
	"lineNumber": 615,
	"columnNumber": 963,
	"errorObject": {}
}

I am unable to reproduce such issue if anyone do so can you please specify the screenshot?

@Rammanojpotla: Talking about "screenshots" does not make sense here - we talk about text, not images.
See previous comments explaining potentially influential factors. Most people will not be able to reproduce.

Krinkle changed the task status from Open to Stalled.Sep 17 2018, 11:20 PM