Page MenuHomePhabricator

ext.uls.interface.js gives error $ulsTrigger.tipsy is not a function
Closed, ResolvedPublic

Description

First use case
Visit http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?debug=1 with a console open, or https://www.mediawiki.org/wiki/MediaWiki?debug=1
In Firefox I get

TypeError: $ulsTrigger.tipsy is not a function
http://en.wikipedia.beta.wmflabs.org/static/master/extensions/UniversalLanguageSelector/resources/js/ext.uls.interface.js
Line 222

stepping through it, $ulsTrigger exists with lots of members, but not tipsy. The same pages don't report any error in normal mode.

This might be related to rEULS6ade20706f.

Second use case
When I first accessed
https://pt.wikibooks.org/w/index.php?title=Alfabeto_dos_animais/T114278&action=edit&redlink=1
I got this on Firefox 42.0:

{
	"errorMessage": "TypeError: $ulsTrigger.tipsy is not a function",
	"url": "https://pt.wikibooks.org/w/load.php?debug=false&lang=pt&modules=ext.centralNotice.bannerController%2CchoiceData%2Cdisplay%2CgeoIP%2CkvStoreMaintenance%2ClegacySupport%2CstartUp%7Cext.centralauth.centralautologin.clearcookie%7Cext.gadget.MwUi%7Cext.uls.init%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.track%2Cve%7Cjquery.byteLength%2CbyteLimit%2Ccookie%2CtabIndex%2CtextSelection%2Cthrottle-debounce%7Cmediawiki.Title%2CUri%2Capi%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2Ctemplate%2Ctoolbar%2Cui%2Cuser%7Cmediawiki.action.edit%7Cmediawiki.action.edit.styles%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.regexp%7Cmmv.head%7Cskins.vector.js%7Cuser.defaults&skin=vector&version=b2678012c992",
	"lineNumber": 33,
	"columnNumber": 323,
	"errorObject": {}
}

The error didn't happen after a page reload, neither on debug mode.
Looks like this is the only script using it:
https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector/blob/b01c7d69b129b9fb48e28b833c914017ecd5dbb2/resources/js/ext.uls.interface.js#L225-L299
Please check the dependencies on the modules you are using.

Event Timeline

Spage raised the priority of this task from to Needs Triage.
Spage updated the task description. (Show Details)
Spage added subscribers: Spage, ori.
Nikerabbit changed the task status from Open to Stalled.Jan 29 2016, 1:39 PM
Nikerabbit added a subscriber: Nikerabbit.

None of us can reproduce this. Can any of the reporters reproduce, and if so have any more details?

He7d3r renamed this task from in debug mode, ext.uls.interface.js gives error $ulsTrigger.tipsy is not a function to ext.uls.interface.js gives error $ulsTrigger.tipsy is not a function .EditedFeb 1 2016, 8:08 PM
He7d3r updated the task description. (Show Details)
He7d3r set Security to None.

If this is related to missing dependencies and a race condition, it is normal that it will be difficult to reproduce.

I saw no note that it would be intermittent though, and some time has passed. tipsy is loaded-when-needed so it is not in the dependencies.

Change 270637 had a related patch set uploaded (by Gerrit Patch Uploader):
Ensure module 'jquery.tipsy' is loaded before using

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

Fomafix changed the task status from Stalled to Open.Feb 15 2016, 12:42 PM
Fomafix claimed this task.

Change 270637 merged by Nikerabbit:
Ensure module 'jquery.tipsy' is loaded before using

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

Amire80 triaged this task as Medium priority.Feb 16 2016, 11:24 AM
Amire80 added a project: WorkType-Maintenance.