Opened 8 years ago
Closed 8 years ago
#39886 closed defect (bug) (fixed)
Invalid jQuery Live Event in handlers.min.js file.
Reported by: | MMDeveloper | Owned by: | adamsilverstein |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Upload | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
Go to wp-includes/js/swfupload/handlers.min.js
At bottom of file you will see reference to ".live(" jquery event, which no longer exists. This jQuery event should be renamed to ".on(". This is a small change that is required.
More info:
As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers.
Attachments (1)
Change History (12)
#3
in reply to:
↑ 1
@
8 years ago
I figured that,
The plugin I'm using uses the old library. Yes the library does work if you change the function name. I've only seen this issue once in the last few years of being a WordPress developer. Its a relatively quick fix, If I had to I guess I can manually update them when I need to but if you can do it as part of the next release that would be appreciated.
Tom
Replying to SergeyBiryukov:
Hi @MMDeveloper, welcome to WordPress Trac! Thanks for the ticket.
FWIW, SWFUpload is no longer used by core, it's only included for compatibility with older plugins or themes, see comment:2:ticket:16668.
The latest fix to
handlers.js
was 3 years ago in [27243]. I guess we could fix the deprecated.live()
method, but does it still work otherwise?
#4
@
8 years ago
- Milestone changed from Awaiting Review to 4.8
- Version changed from trunk to 3.6
Related: #22975
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
8 years ago
#6
@
8 years ago
If this really is unused, we should probably deprecate it rather than leaving the expectation that this is being maintained. However, I'm not opposed to fixing this if there's a patch.
#7
@
8 years ago
Hi guys,
Look I've just mentioned this is the issue I found. You guys are in charge, Fix it or remove it. I've told you guys how to patch it in the comments above. But even I don't know the full impact of it across other sites. If you decided to remove this script, I would just re-add it for my one client.
#8
@
8 years ago
- Owner set to adamsilverstein
- Status changed from new to assigned
In 39886.diff:
- Switch deprecated jQuery
.live()
calls with.on()
inwp-includes/js/swfupload/handlers.js
@MMDeveloper can you please confirm this patch is the change you were suggesting? Thanks.
Hi @MMDeveloper, welcome to WordPress Trac! Thanks for the ticket.
FWIW, SWFUpload is no longer used by core, it's only included for compatibility with older plugins or themes, see comment:2:ticket:16668.
The latest fix to
handlers.js
was 3 years ago in [27243]. I guess we could fix the deprecated.live()
method, but does it still work otherwise?