Opened 4 years ago
Last modified 10 months ago
#51812 reviewing task (blessed)
Update jQuery step three
Reported by: | azaozz | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | External Libraries | Keywords: | early needs-testing needs-dev-note has-patch |
Focuses: | javascript | Cc: |
Description
Follow up from #37110 and #50564.
Remove jQuery Migrate 3.3.x.
This ticket represents step 3 in the following roadmap for updating jQuery to 3.x in Core: https://make.wordpress.org/core/2020/06/29/updating-jquery-version-shipped-with-wordpress/.
Attachments (1)
Change History (136)
#2
@
4 years ago
If you decide to call jQuery.UNSAFE_restoreLegacyHtmlPrefilter()
as part of #50564 then the Migrate warnings will include violations related to self-closed tags. Before you remove Migrate, you'll need to remove that call (or you can do it all in one go).
#3
@
4 years ago
- Milestone changed from Future Release to 5.7
Moving to 5.7, per the linked roadmap.
This ticket was mentioned in PR #812 on WordPress/wordpress-develop by Clorith.
4 years ago
#4
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/51812
This is an initial patch, with many minor adjustments to a wide array of core files.
Updating the jQuery usage in core is something we should get in early, and will also require some upstream patches to libraries used by WordPress (or, in some cases, updates may exist, the initial focus of this PR is the direct use in core).
A fair amount of deprecations that are not addressed in this PR are being thrown by jQuery UI.
The process taken to identify deprecation issues in core has been a manual one, the initial plan here was to merely do some fancy regex search replace commands, but a lot of components built by core are using similar function names and argument parameters, so instead this has been a manual endeavor, and probably should remain so to keep accidentally breaking changes to a minimum during the alpha stage.
In testing, each admin page was visited, and deprecation warnings addressed individually until there were external libraries throwing warnings. Individual interactions on the page are performed (for example on the classic post editor screen, change the publication time, change the post status), although I make no guarantee there's not scenarios where an interaction may have been missed, so would be good to get more eyes involved.
One exception that is in core, but has not been patched up
{{{js
Accessibility mode.
$( window ).on( 'load', function() {
component.setupAccessibleMode();
});
}}}
This is used in the different components under `src/js/_enqueues/wp/widets` which are triggering "too late" in some scenarios, and jQuery throws a warning that the load event has already fired by the time the component is initialized.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#7
@
4 years ago
- Keywords early needs-testing added
Marking as needs-testing
and early
, just as Step 2 in 5.6 was marked.
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
4 years ago
#10
@
4 years ago
@Clorith mentions in the Pull Request:
A fair amount of deprecations that are not addressed in this PR are being thrown by jQuery UI.
We discussed this in today's bug scrub, and think it could potentially be a good idea to split the jQuery UI piece into a separate issue.
4 years ago
#11
Great job!
Just a small suggestion: seems it may be better to replace $.trim( var )
with ''.trim( var )
instad of var.toString().trim()
. The last would throw an error when var
is undefined, both $.trim()
and ''.trim()
would return an empty string. All browsers since IE10 have that, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim. For multiple uses can even set local version: var trim = ''.trim;
at the top, etc. Alternatively can do var = var || ''
before using var.toString()
.
For the way $( window ).on( 'load',
is used in the widgets js perhaps may need to look at Document.readyState
, see: https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState. Seems it was incorrect before the jQuery update but now that throws a warning.
4 years ago
#12
Good catch on the .trim()
bit, I half expected it to be validated before it reached the point of trying to use it.
The .on( 'load'
bit has likely been wrong for some time as you say, yeah, isn't the readyState
technically the same here though, and would still be "too late"? Or am I misreading you perhaps?
4 years ago
#13
...isn't the readyState technically the same
Yeah, document.onreadystatechange
can be used instead of "DOM ready", etc. Thinking it can look at the "property" document.readyState
. Perhaps something like:
if ( document.readyState === 'complete' ) { // Page is fully loaded. component.setupAccessibleMode(); } else { // Page is still loading. $( window ).on( 'load', function() { component.setupAccessibleMode(); }); }
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
4 years ago
#16
Ahh, I see what you mean then, that does make sense then.
I've patched the widgets to use your suggestion above (it made the most sense right off the bat).
For the toString().trim()
section, I chose the option of var = var || '';
, as a quick check showed it being the way core has previously done it in another location as well, so sticking to the same made sense.
#17
@
4 years ago
@Clorith @azaozz What's left for this ticket to get it merged for pre-Beta 1 testing?
#18
follow-up:
↓ 20
@
4 years ago
We'll want to get in the core fixes for deprecations sooner rather than later (did the timeline for 5.7 change, or am I just terrible at keeping track here?)
As for removing jQuery Migrate being enabled by default, I think we will want to move that back one release (to 5.8). I would ideally like to have more stewing time to capture any missed deprecations in core, and give the jQuery UI team a chance to get their deprecation fixes done as well, so that we do not need to build that our selves.
#19
@
4 years ago
did the timeline for 5.7 change, or am I just terrible at keeping track here?
Nope, 5.7 timeline hasn't changed. Beta 1 is 2 Feb, ie 2 weeks away.
I would ideally like to have more stewing time to capture any missed deprecations in core, and give the jQuery UI team a chance to get their deprecation fixes done as well, so that we do not need to build that our selves.
Makes sense for the jQuery deprecations.
For those following, the jQuery UI ticket is #52163.
#21
follow-up:
↓ 26
@
4 years ago
Yes, PR 812 is good to go as a first push. There will very likely be more minor patches needing to go in for this once we get some real testing going and places that were missed are discovered. But we really just need to get it in to start that process (I had hoped for early to be... much earlier than this :/ but it is what it is)
#22
@
4 years ago
Agreed. Get it merged. Then monitor for other minor patch needs.
Is anything blocking PR812 from being merged?
#23
@
4 years ago
I believe it's on the radar for @SergeyBiryukov (just needs a committer really to give it the once-over and get it in)
This ticket was mentioned in Slack in #core-committers by hellofromtonya. View the logs.
4 years ago
#26
in reply to:
↑ 21
;
follow-up:
↓ 28
@
4 years ago
Replying to Clorith:
Yes, PR 812 is good to go as a first push.
Thanks for the PR! Just noting it needs a refresh after [49944] / #46872 and [49973] / #52073.
The first three conflicts are fairly easy to resolve (just remove #doaction2
), but I'm less sure about the change in js/_enqueues/wp/widgets/text.js
. It looks like the change from this PR takes a different approach at fixing the same issue, so we need to decide on the preferred approach. Since [49973] appears to be tested and confirmed, do we still need $( window ).on( 'load', ... )
there? /cc @azaozz
#27
@
4 years ago
- Keywords needs-refresh added
Adding needs-refresh
for resolving the merge conflicts Sergey noted above.
#28
in reply to:
↑ 26
@
4 years ago
Replying to SergeyBiryukov:
Since [49973] appears to be tested and confirmed, do we still need
$( window ).on( 'load', ... )
there?
Thinking best would be to keep the changes from [49973] as they make sense. Right, they are tested, also looking at #40986 and [40941] it's not clear why this was originally running on $( window ).on( 'load'
instead of DOM ready.
#29
@
4 years ago
I suspect the reason was to account for different timings of when they were enqueued, if called by plugins or themes in other locations as well?
If that were the case, the readyState check would help account for this, and not cause unexpected behaviors in anything calling them in a strange location, I'll let someone make that judgement call on which is the preferred approach here though.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#31
@
4 years ago
- Keywords needs-refresh removed
After some testing, [49973] seems to work as expected for me too, so I guess we can skip that part of the patch for now and get back to it if any follow-up issues are reported.
I have already resolved the other merge conflicts locally and will commit shortly.
This ticket was mentioned in Slack in #core by francina. View the logs.
4 years ago
#34
@
4 years ago
- Keywords needs-testing-info added
Let's identify a testing strategy for [50001].
Please provide need more information for testers to manually test the patch (including at Test Scrubs):
- What are the steps to test?
- Are there any testing dependencies, such as a plugin or script?
- What is the expected behavior after applying the patch?
#35
@
4 years ago
In the diff, I see this
trunk/src/js/_enqueues/admin/site-health.js
line 208 pct = ( ( 100 - val ) / 100 ) * c + 'px';
If it's a percentage, why put 'px'?
#36
follow-up:
↓ 39
@
4 years ago
While running the QUnit tests, I came across this warning - jQuery.unique is deprecated; use jQuery.uniqueSort
. Upon checking, there's an instance of unique() method being used in customize-widgets.js
#37
@
4 years ago
@hellofromTonya great question! So this is a bit of an "oddball" to track, since it requires checking for JavaScript notices or errors, but there's a few ways to do this.
One way is actually to use the Enable jQuery Migrate Helper plugin, by visiting its settings (found under Tools > jQuery Migrate
), you can enable deprecation warnings and logging for WordPress 5.6 or newer, this is great for non-technical users to test and look for warnings around wp-admin, as it will print them on-screen for the user.
If not, using the JavaScript console of your browser is the more technical approach (I mention this second, as not everyone is comfortable in these interfaces. There's a support article on diagnosing JavaScript errors which covers how to open and use these.
Now for the actual testing it self, this is kind of wide. One literally has to visit pages in the WordPress backend, and use features, and see if any warnings show up.
The expected behavior is that nothing should have changed form before and after the patch in features or visuals, only that no warnings should be created in the JavaScript console/plugin mentioned above.
@joyously That's because it is calculating a pixel offset based on a percentage, and a warning is now thrown when using offsets without defining the unit as well.
#38
@
4 years ago
- Keywords needs-testing-info removed
This ticket is ready to test following the instructions Marius laid out.
The patch has already been committed into the trunk/master.
#39
in reply to:
↑ 36
;
follow-up:
↓ 88
@
4 years ago
Replying to Hareesh Pillai:
While running the QUnit tests, I came across this warning -
jQuery.unique is deprecated; use jQuery.uniqueSort
. Upon checking, there's an instance of unique() method being used in customize-widgets.js
Just noting that the instance in customize-widgets.js
appears to be a function from Underscore.js and looks correct as is. Changing it to uniqueSort()
does not remove the warning in my testing.
The only instances of jQuery.unique()
I've found are from jQuery UI, so I think the warning comes from there.
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by monikarao. View the logs.
4 years ago
#43
@
4 years ago
I have executed smoke testing of the WordPress backend by visiting admin pages. I have not encountered deprecation warnings or errors (used both jQuery Migrate plugin and opened console).
#44
@
4 years ago
When I select an image in the media library and open the Edit Image screen, I see the following:
jQuery.fn.keypress() event shorthand is deprecated
image-edit.js line 125
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/lib/image-edit.js#L125
jQuery.fn.focus() event shorthand is deprecated
image-edit.js line 692
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/lib/image-edit.js#L692
When I rotate an image on the same screen:
jQuery.fn.removeAttr no longer sets boolean properties: disabled
image-edit.js line 405
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/lib/image-edit.js#L405
And these are from the third party imgAreaSelect jQuery plugin:
Number-typed values are deprecated for jQuery.fn.css( "fontSize", value )
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/imgareaselect/jquery.imgareaselect.js#L1165
jQuery.fn.unbind() is deprecated
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/imgareaselect/jquery.imgareaselect.js#L1013
jQuery.fn.resize() event shorthand is deprecated
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/imgareaselect/jquery.imgareaselect.js#L1028
#45
@
4 years ago
Should we update the description of this ticket to mention that this scopes updating WP for compatibility with jQuery 3.5.1?
Currently, it mentions "Remove jQuery Migrate 3.3.x." and is milestoned for 5.7, which I believe is not correct as per https://wordpress.slack.com/archives/C02RQBWTW/p1612204448014300.
#46
@
4 years ago
It's still work related to the disabling of jQuery Migrate by default though, keeping it as a blessed task for 5.7 still makes sense, so that the focus on fixing deprecations in core are not lost.
The milestone should then move to 5.8 when we hit RC, so that the focus can shift to getting the last pieces needed for jQuery Migrate in place, and start informing folks for the next cycle.
#48
@
4 years ago
This ticket was mentioned in PR #982 on WordPress/wordpress-develop by Clorith.
4 years ago
#49
Trac ticket: https://core.trac.wordpress.org/ticket/51812
Further jQuery deprecation resolutions, see trac ticket for history and further details.
#50
@
4 years ago
I added PR #982 to address the items that @poena discovered. It further modifies the imgareaselect
library, which appears unmaintained since 2013 (I see we have previously also made custom edits to this library). I limited the modifications to only reported deprecations and made them in the bundled library file, and appended -wp
to the version string header in the file (this is in line with how core also handled the jQuery 1.12 distributions which were custom patched and no longer maintained).
There are various forks of this library, but there are likely also better solutions that could be investigated by now if the plan is to move away from jQuery used by core as part of the long run.
#51
@
4 years ago
The items from comment:48 appear to be the jQuery-UI elements, I see they're all triggering on the customizer where it is loaded up... I'll be updating the plugin to more closely identify if it's cores own files, or libraries (and if so, which library) is causing a deprecation when possible I think, to make this easier for everyone :)
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#53
@
4 years ago
- Keywords commit added
Marking PR 982 for commit
to move it into the commit workflow for Beta 2 today. Don't want to lose track of this one.
Note to core committer:
This is an incremental commit on this ticket. Please remove the commit
keyword once reviewed and/or committed. Thanks.
#55
@
4 years ago
- Keywords commit removed
Removing commit
as PR 982 has been committed with changeset [50270].
hellofromtonya commented on PR #982:
4 years ago
#56
Merged with changeset https://core.trac.wordpress.org/changeset/50270.
hellofromtonya commented on PR #982:
4 years ago
#57
Merged with changeset https://core.trac.wordpress.org/changeset/50270.
#59
@
4 years ago
In the privacy tools screen, export personal data,
when I click on the link "Download personal data" I see
jQuery.fn.blur() event shorthand is deprecated
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/admin/privacy-tools.js#L75
Site health, Info, when clicking on "Copy site info to clipboard":
jQuery.fn.focus() event shorthand is deprecated
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/admin/site-health.js#L27
Media library, after opening Attachment details, when clicking "Copy URL to clipboard" for the file URL:
jQuery.fn.focus() event shorthand is deprecated
https://core.trac.wordpress.org/browser/trunk/src/js/media/views/attachment/details.js#L51
Thickbox:
Installed plugins page, when clicking on "view details",
Add plugins page, when clicking "more details"
jQuery.fn.bind() is deprecated
tb_show thickbox.js?ver=3.1-20121105:256
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/thickbox/thickbox.js#L256
jQuery.fn.focus() event shorthand is deprecated
tb_show thickbox.js?ver=3.1-20121105:271
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/thickbox/thickbox.js#L271
jQuery.fn.click() event shorthand is deprecated
tb_show thickbox.js?ver=3.1-20121105:57
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/vendor/thickbox/thickbox.js#L57
This ticket was mentioned in PR #1001 on WordPress/wordpress-develop by bordoni.
4 years ago
#60
Resolved the issues mentioned by @poena on the ticket for jQuery 3.5.X compatibility.
Trac ticket: https://core.trac.wordpress.org/ticket/51812
hellofromtonya commented on PR #1001:
4 years ago
#62
Closing with changset https://core.trac.wordpress.org/changeset/50367
This ticket was mentioned in Slack in #core-themes by poena. View the logs.
4 years ago
#64
follow-up:
↓ 67
@
4 years ago
@SergeyBiryukov there seems to be a regression in r50367
Opening a 'View details' thickbox on the plugins.php page results in a the close button to be non-functional giving the following console error.
[Error] TypeError: this.trigger is not a function. (In 'this.trigger( 'blur' )', 'this.trigger' is undefined) tb_click (thickbox.js:38) (anonymous function) (plugin-install.js:173) dispatch (jquery.js:5429)
This ticket was mentioned in Slack in #core by afragen. View the logs.
4 years ago
#67
in reply to:
↑ 64
@
4 years ago
Replying to afragen:
Opening a 'View details' thickbox on the plugins.php page results in a the close button to be non-functional giving the following console error.
Thanks, I was able to reproduce.
It looks like the blur()
method there is not the jQuery method, but is a regular JS method instead, so can be reverted to just this.blur()
.
#70
@
4 years ago
Had reports of deprecated warnings:
1. /wp-admin/js/common.min.js: jQuery.fn.delegate() is deprecated 2. .. 3. /wp-admin/js/common.min.js: jQuery.fn.click() event shorthand is deprecated 4. /wp-admin/js/common.min.js: jQuery.fn.bind() is deprecated 5. /wp-admin/js/common.min.js: jQuery.fn.mousedown() event shorthand is deprecated 6. /wp-admin/js/common.min.js: jQuery.fn.focus() event shorthand is deprecated 7. /wp-admin/js/svg-painter.js: jQuery.fn.hover() is deprecated
Discussed in slack with @Clorith .click()
should be converted to .trigger('click')
except when coming from a different library. Marius will take a look.
Looking in common.js
script:
.click()
instance is here.focus()
instance is here.bind()
instance is here
This ticket was mentioned in PR #1032 on WordPress/wordpress-develop by Clorith.
4 years ago
#71
Trac ticket: https://core.trac.wordpress.org/ticket/51812
I apparently just can't get enough of this jQuery stuff :)
Now with 100% more jQuery 3.5 deprecations included in my matching. There were further things, but this close to RC I'm not comfortable making adjustments beyond the simple and safe triggers that are just replacing shorthands with full declarations.
#72
@
4 years ago
- Keywords commit added
Marking PR #1032 for commit
.
This PR addresses some of the jQuery 3.5 depreciations, though much will need to continue into 5.8 (we're just too close to RC).
For shorthand event deprecations, changes from .eventName()
to .on( 'eventName',
or when triggering converts to .trigger( 'eventName' )
:
.blur()
.click()
.change()
.focus()
.keypress()
.keyup()
.bind()
.unbind()
.unload()
.submit()
and a few others:
$.parseJSON
toJSON.parse
jQuery.isFunction()
totypeof ... === 'function'
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#74
@
4 years ago
- Keywords commit removed
I've added a couple of notes to the pull request based on a code review. Removing the commit keyword as it looks like there is a minor regression in there.
I'll pull down the branch for some actual testing so may add further notes during the day.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#78
@
4 years ago
- Keywords commit added
All concerns and requests for PR 1032 have been addressed including the minor regression @peterwilsoncc found.
Marking the patch for PR 1032 for commit
.
adamsilverstein commented on PR #1032:
4 years ago
#79
Code changes look good to me.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#82
@
4 years ago
- Keywords commit removed
- Milestone changed from 5.7 to 5.8
Moving to 5.8 for any follow-up changes.
#83
@
4 years ago
Overnight I twigged to another regression in [50420] -- in a few places $thing.get(0).trigger()
is used. These will need to be changed to $thing.eq(0).trigger()
as jQuery's get()
function returns a DOM element rather than a jQuery object.
This ticket was mentioned in PR #1087 on WordPress/wordpress-develop by Clorith.
4 years ago
#86
Trac ticket: https://core.trac.wordpress.org/ticket/51812
Further removes remaining deprecations in core. This is likely not the final list, but we are not far from that point I suspect.
#88
in reply to:
↑ 39
@
4 years ago
Replying to SergeyBiryukov:
Replying to Hareesh Pillai:
While running the QUnit tests, I came across this warning -
jQuery.unique is deprecated; use jQuery.uniqueSort
. Upon checking, there's an instance of unique() method being used in customize-widgets.js
Just noting that the instance in
customize-widgets.js
appears to be a function from Underscore.js and looks correct as is. Changing it touniqueSort()
does not remove the warning in my testing.
The only instances of
jQuery.unique()
I've found are from jQuery UI, so I think the warning comes from there.
4 years ago
#90
Implemented in https://core.trac.wordpress.org/changeset/50547
This ticket was mentioned in Slack in #core by sergey. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#99
@
3 years ago
Hoverintent library has got an update recently where jQuery.isFunction was replaced with modern code - https://github.com/briancherne/jquery-hoverIntent/releases/tag/v1.10.2, so it's worth considering updating the version bundled with WP.
This ticket was mentioned in Slack in #core by chaion07. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
3 years ago
#108
follow-up:
↓ 109
@
3 years ago
WP 6.0
Notice jQuery.fn.bind() is deprecated
Location: wp-admin/js/postbox.min.js
Triggered on page /wp-admin/
#109
in reply to:
↑ 108
@
3 years ago
Replying to ipajen:
WP 6.0
Notice jQuery.fn.bind() is deprecated
Location: wp-admin/js/postbox.min.js
Triggered on page /wp-admin/
Thanks! Hmm, that sounds like the wp-admin/js/postbox.min.js
file was for some reason not properly updated on that install. All of the jQuery.fn.bind()
calls in that file were replaced in [50001] for WordPress 5.7. Looking at that file in the build repo: postbox.min.js, there are no mentions of bind
there.
#110
follow-up:
↓ 111
@
3 years ago
WP 6.0
JQMIGRATE: jQuery.fn.bind() is deprecated
wp-admin/media-new.php
/wp-includes/js/plupload/handlers.min.js?ver=6.0
#111
in reply to:
↑ 110
;
follow-up:
↓ 112
@
3 years ago
- Keywords has-patch removed
Replying to ipajen:
WP 6.0
JQMIGRATE: jQuery.fn.bind() is deprecated
wp-admin/media-new.php
/wp-includes/js/plupload/handlers.min.js?ver=6.0
Thanks! Indeed, there are still a few .bind()
calls in the plupload/handlers.js
file. Would you be interested in working on a patch? The unminified file is located at js/_enqueues/vendor/plupload/handlers.js.
#112
in reply to:
↑ 111
@
3 years ago
@SergeyBiryukov I would But, I have only 0.0001 % skills about coding, so I better pass ;) But thanks for asking.
Replying to SergeyBiryukov:
Replying to ipajen:
WP 6.0
JQMIGRATE: jQuery.fn.bind() is deprecated
wp-admin/media-new.php
/wp-includes/js/plupload/handlers.min.js?ver=6.0
Thanks! Indeed, there are still a few
.bind()
calls in theplupload/handlers.js
file. Would you be interested in working on a patch? The unminified file is located at js/_enqueues/vendor/plupload/handlers.js.
This ticket was mentioned in Slack in #core by costdev. View the logs.
3 years ago
This ticket was mentioned in PR #2779 on WordPress/wordpress-develop by ethanclevenger91.
3 years ago
#114
- Keywords has-patch added
Remove deprecated jQuery function bind
, replace with on
, in handlers.js.
Trac ticket: [](https://core.trac.wordpress.org/ticket/51812)
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
#116
@
2 years ago
Question from today's bug scrub: Wouldn't it be easier to close this ticket and handle specific changes like bind
calls replacing in specific tickets?
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
2 years ago
#119
follow-up:
↓ 120
@
2 years ago
- Keywords close added
Discussed this again in today's bugscrub and the feeling was that this ticket should likely be closed. The jQuery upgrade is complete - any remaining deprecations in Core can be handled on separate tickets.
#120
in reply to:
↑ 119
;
follow-up:
↓ 122
@
2 years ago
- Keywords close removed
Replying to markparnell:
The jQuery upgrade is complete - any remaining deprecations in Core can be handled on separate tickets.
Just to clarify, this ticket is not only about addressing the remaining deprecations, but also specifically about removing jQuery Migrate 3.3.x, as outlined in the description per the step 3 of the roadmap for updating jQuery to 3.x.
Until that is done, the jQuery upgrade is not complete, so the ticket needs to remain on our radar :) I think the latest PR here still needs to be addressed, then the ticket could probably be moved to Future Release until we're confident that jQuery Migrate 3.3.x can be removed.
This ticket was mentioned in Slack in #core by chaion07. View the logs.
2 years ago
#122
in reply to:
↑ 120
@
2 years ago
Replying to SergeyBiryukov:
I think the latest PR here still needs to be addressed, then the ticket could probably be moved to Future Release until we're confident that jQuery Migrate 3.3.x can be removed.
Happy to address any feedback in my PR to get it moving/merged. Thanks!
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by costdev. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
2 years ago
SergeyBiryukov commented on PR #2779:
2 years ago
#130
Thanks for the PR! Merged in r54495.
#131
@
2 years ago
- Milestone changed from 6.1 to Future Release
Moving to Future Release for now, this can be put on a release milestone again when there is consensus about removing jQuery Migrate, as per the step 3 of the roadmap for updating jQuery to 3.x.
#132
follow-up:
↓ 133
@
2 years ago
Any chance of getting 3.4.0 as it's just a link change on your side and as jQuery Migrate is still in WordPress?
Or a warning removal:
/*Remove JQuery Migrate warning*/ function remove_jquery_migrate_notice() { $m= $GLOBALS['wp_scripts']->registered['jquery-migrate']; $m->extra['before'][]='temp_jm_logconsole = window.console.log; window.console.log=null;'; $m->extra['after'][]='window.console.log=temp_jm_logconsole;'; } add_action( 'init', 'remove_jquery_migrate_notice', 5 );
#134
in reply to:
↑ 133
@
2 years ago
Hi @SergeyBiryukov
I have made a pull request with the updated jquery-migrate version 3.4.0
Here is the pull request link, https://github.com/WordPress/wordpress-develop/pull/3550
and commented also to the ticket, https://core.trac.wordpress.org/ticket/56743
Please let me know if anything needs to be done to make it perfect.
Regards,
Sajib
To be able to disable jQuery Migrate, all
JQMIGRATE
warnings that are outputted to the browser console (whenSCRIPT_DEBUG
is enabled) will have to be fixed in core, themes and plugins.This is a very large task that likely will need some workarounds for older and/or unsupported themes and plugins.
A first step would be to fix all of the (old) js in core. At the same time the core js can be updated to use the new features and syntax from jQuery 3.5+.