#52972 closed defect (bug) (invalid)
WordPress background report jQuery error
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.7 |
Component: | General | Keywords: | has-patch |
Focuses: | ui | Cc: |
Description
Here I have the following error:
Upon investigation, it appears to be the following two documents:
wp-includes/js/jquery/jquery.js wp-includes/js/jquery/jquery.min.js
The following calls exist:
jQuery.noConflict()
Since the backend core of WordPress seems to already use jQuery instead of $, I think I can remove this call
The temporary solution is to delete it
Attachments (1)
Change History (6)
This ticket was mentioned in PR #1169 on WordPress/wordpress-develop by jack9603301.
4 years ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core by jack960330. View the logs.
4 years ago
#3
@
4 years ago
Hiya,
Looking at your original issue, something appears to have modified the load order on your site, as jQuery is a dependency of the jQuery UI library (that those files causing errors originate with).
If you need help troubleshooting or resolving this, I would recommend creating a support forum post, where our support volunteers can help you out.
As for your followup on noConflict
; this problem would not be resolved by not using noConflict
, as that is a feature that makes jQuery not automatically bind to the $
shortcut.
The reason for core explicitly declaring noConflict
is that multiple libraries use the $
shortcut, and binding it to WordPress directly has the potential to break plugins or themes.
Related #16494
#4
@
4 years ago
- Resolution set to invalid
- Status changed from new to closed
I reviewed my problem and although it was fixed by this method at the time, in the latest test, the problem disappeared, perhaps because of configuration issues that caused jQuery to not be loaded in a particular order. Sorry, this PR will be turned off
We think that
jQuery
is already used in WordPress, so it makes no sense to enable noConflict modeTrac ticket: https://core.trac.wordpress.org/ticket/52972