Page MenuHomePhabricator

UploadWizard assumes presence of jquery.suggestions plugin
Closed, ResolvedPublic

Description

...but there are cases when this plugin isn't present, e.g. when the Vector extension is not enabled, or when a skin other than Vector is used (although in the latter case you have worse things to worry about, see bug 25796). In those cases, a JS error is thrown and whatever the suggestions plugin is used for doesn't work. Haven't noticed any other bad effects.

If you want/need to, you can detect the presence of the suggestions plugin with if ( 'suggestions' in $j.fn )


Version: unspecified
Severity: major

Details

Reference
bz25797

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz25797.

Merging bugzilla components "Multimedia Usability" and "Upload Wizard"

neilk wrote:

(In reply to comment #0)

...but there are cases when this plugin isn't present, e.g. when the Vector
extension is not enabled, or when a skin other than Vector is used (although in
the latter case you have worse things to worry about, see bug 25796). In those
cases, a JS error is thrown and whatever the suggestions plugin is used for
doesn't work. Haven't noticed any other bad effects.

If you want/need to, you can detect the presence of the suggestions plugin with
if ( 'suggestions' in $j.fn )

We don't have any concept of conditional loading in the primitive resource loader that I hacked into UploadWizard. Also, it seems that we're being deployed ahead of ResourceLoader, and some people have asked about using this with non-WMF wikis.

So, I'm just going to include my own, and if it happens to overwrite the one in Vector, so be it.

That said we're probably going to have this issue with libs we've hacked up more at the WMF (like tipsy.js) so I'll have to examine what JS really is in WMF deployment branch now, and how to avoid having multiple "lines" of development for these libraries.

Fixed in r76327.