Currently when using plupload.module with jQuery >= 1.9, Firebug will capture a JS error message as below:

TypeError: $.browser is undefined
plupload.js (line 51)
...[browser] && Drupal.plupload.compareVersions($.browser.version, requirements[bro...

As refer to http://api.jquery.com/jQuery.browser/:

Description: Contains flags for the useragent, read from navigator.userAgent. This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.

A dirty workaround patch attached to remove the usage of $.browser; As a better alternative, we may consider using http://api.jquery.com/jquery.support/ instead?

Comments

hswong3i’s picture

Status: Active » Needs review
StatusFileSize
new974 bytes
slashrsm’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
StatusFileSize
new2.95 KB

It looks that this requirements checks test only if Firefox > 3.6, as FF 3.6 doesn't support multiple attribute properly. I'd say we can kill this checks as FF doesn't support this version any more.

_requirements are technically not API (while people could still use them via custom modules), so I'd say just kill it entirely. Other option would be to kill it in 7.x-2.x, make it recommended release and note on project page that 7.x-1.x works only with jQuery < 1.9.

hswong3i’s picture

Totally agree for kill it entirely ;-)

BTW, it is a bit confuse for me about label it for 7.x-2.x, as I didn't see any roadmap nor description about what's going on for 7.x-2.x branch. Will it support plupload > v2.0.0?

slashrsm’s picture

Status: Needs review » Fixed

OK. Committed to 7.x-2.x.

That branch was introduced with one minor fix that could potentially cause API breake. It is mostly the same as 7.x-1.x. There is no real roadmap for it actually.

I am planning Plupload 2.x for D8 version. Not sure if I'm going to backport it though (help is always welcome of course).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

robertom’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Assigned: hswong3i » Unassigned
Status: Closed (fixed) » Reviewed & tested by the community

Patch #2 apply clearly to 7.x-1.x and fix the problem, but isn't committed to 7.x-1.x

I reopen the bug and change the version affected

dave reid’s picture

I agree this should also be committed to 7.x-1.x.

slashrsm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x.

  • slashrsm committed f4d695b on 7.x-1.x
    Issue #2190007 by slashrsm, hswong3i: Fixed "$.browser is undefined" for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.