Reputation: 95
I have problem with missing files of jquery in wp-admin. On live site everything is correct, 0 bugs but on wp-admin like you see it's messing jquery file. Any ideas?
Upvotes: -1
Views: 1108
Reputation: 1578
FYI:
The only way that strange issue was fixed is when I forcefully loaded a copy of jQuery from a CDN directly inside /public_html/wp-admin/includes/admin.php
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
';
Not sure where that issue comes from, not sure I care, it's WP... Enjoy -
Upvotes: 1
Reputation: 2544
Maybe there is a plugin which causes the problem. Try to deactivate them one by one, if it solves the issue. Try changing the theme, there might be the problem. If this does not help:
You can try to add jQuery to your backend by hand using admin_enqueue_scripts
and putting this in the function.php file of your theme:
function my_jquery_script() {
wp_enqueue_script( 'jQuery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js');
}
add_action( 'admin_enqueue_scripts', 'my_jquery_script' );
https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
Upvotes: 0