In our WP backend on the Plugins admin page, I am receiving an error of “jQuery not defined”. This only happens on the Plugins admin page. It looks like the error has to do with the Uninstall action. There is javascript being output before the html doctype. See attached screenshot. Any ideas?
Support Forum
Hi – where are you seeing this error? i.e.: Can you attach a screen shot where the error is being shown so we can see how its manifested? I don’t think we’ve ever seen that kind of an error on the admin pages.
Thanks.
Hello, Can you see the screen shot I attached in my original post? I am re-attaching it here.
The issue happens on the Plugins page on the back end of WordPress. (/wp-admin/plugins.php).
I discovered it when I was updating other plugins and received a strange error message. Even though I got an error message, the other plugin updates went through. I will attach a screenshot of the error message from the update of other plugins.
On the plugins page, this snippet of javascript gets added to the top of the page before the <doctype>. Which i assume the placement of this code is throwing the error “jQuery not defined”, since it’s at the top of the document. Figuring out why it is loading there I guess is the issue : )
<script>
(function(spj, $, undefined) {
$(document).ready(function () {
$('#sp-uninstall-link').click(function () {
var answer = $("#spuninstalldialog").dialog({width: 600})
.find(':checkbox').off('change').on('change', function (e) {
if (this.checked)
$('#sp-url').val('/wp-admin/plugins.php?spf=uninstall&remove=storage');
else
$('#sp-url').val('/wp-admin/plugins.php?spf=uninstall');
});
});
});
}(window.spj = window.spj || {}, jQuery));
</script>
Hi:
“MashShare” is not one of our products.
If Javascript code is loading in an unexpected place the usual suspect is caching or an optimization plugin that is trying to do things with javascript files.
Thanks.
Thank you.
I am aware that MashShare is not one of your products, but the intent of that screenshot was to point out that when I update any plugin on the site, it shows an error that has to do with the Uninstall code for SimplePress.
I will take a look at any caching plugins we have installed.
Hi:
Yeah, something is moving the JS code around. If its not a caching plugin/cdn then its likely another plugin or theme so you might have to go through the process of deactivating all plugins/themes and then reactivating one by one till the conflict is located.

