Do you get “jQuery is not defined” as an error after a fresh WordPress Install? JavaScript not working at your admin panel? Don’t worry, I have the solution.
After installing two new WordPress installations with defective admin JavaScript that won’t allow me to
- Open the menus (in the admin panel’s left side)
- See the post editors toolbar
- Install new plugins
- Install new themes
I understood I was having some kind problem with the Javascript jQuery library.
I deactivated all the plugins and nothing happened. Then I started looking at the source code and googeling for quite a long time. After some serious research I discovered what caused the issue.
The Problem
While uploading the WordPress installation files onto the server I had some issues that cause some of the JavaScript files to not be uploaded / be corrupted.
The Solution
Re upload the wp-includes\js
folder and overwrite whatever is in there.
That’s what fixed it for me.
I hope this helped someone, if it does, or does not – comment to help or get help.
I had a nice ajax slideshow (jd slideshow) working on my site until I installed some new ajax plugins. I don’t know which one broke the slideshow. I didn’t notice until later.
I de-activated the new plugins.
I re-uploaded the wp-includes/js folder contents but slideshow still broken.
Firefox error console lists jQuery not defined and addLoadEvent not defined.
The addLoadEvent is what starts the slideshow. No other errors.
All the other wp functions are still working fine.
I was having the same problem. Mine had to do with permissions on the .htaccess file. I’m not 100% sure why that fixed it, but the permissions were wrong, I set them to 666 and my JQuery error went away.
How do I re upload wp-includes\js please?
None of the solutions worked for me, jquery is not working in my frontend
@omar can you paste your link here where you facing error or a code snip to get this working.
Wow, absolutely great hint! That was the problem at one of my blogs, too! Thank you very much! Now first I have to take a shower to cool down. :)
Hi,
I have the sam problem. But your solution does not solve it.
Do you have any other one??
tnx
try the following link
http://wordpress.org/support/topic/javascript-error-in-admin-panel-with-load-scriptsphp?replies=1
Try to disable all plugins first and try to active them one by one and monitor all the JS errors. This issue is common when you have some outdated plugins. Thanks!
THANK you so much for spending the time to do that research. I was just starting on the same process myself when I stumbled upon your post here, and overwriting the contents of the js folder did the trick just as you said it would.
CHEERS~! Sylvia
Worked for me! Thank You!
how to re upload js folder??
Thank you! I am new to wordpress and I am just trying to create my new wordpress theme. Why not use multi-level menus to start with? So I wantet to use jquery as with many themes the hover attribute of li was used to style the second level of ul, but that does not work in IE 6.
I just could not use jquery at all, till I have found your blog. I have udated it once to verion 3.1, so that might have caused the problem!
thank you, it works for me!!!
[…] was having EXACTLY the same errors as this guy–basically, none of the javascript elements in WordPress were working, ex. Check All […]
I found that my in my Theme functions file there was an extra few lines trying to change the jQuery files.
For example in ./wp-content/themes/twentyten/functions.php near the bottom:
function my_init_method() {
wp_deregister_script( ‘jquery’ );
wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js’);
wp_enqueue_script( ‘jquery’ );
}
add_action(‘init’, ‘my_init_method’);
I believe these were added by some plug-in. Just comment them out and the jQuery should function again. My problem was on the menu editor under appearance. I couldn’t drag the menus about.
Thanks for your help
Was pulling my hair out having problems with script errors.
“Re upload the wp-includesjs folder and overwrite whatever is in there.
That’s what fixed it for me”
Worked first time.
Saved me a lot of grief.
The above solutions make absolutely no sense.
The only right solution is to block the concatenation of scripts:
add in wp-config.php:
define(‘CONCATENATE_SCRIPTS’, false);
That works.
Hallo ich hab das ganze mal zusammengefasst
http://www.erfolg-reich.org/wordpress-jquery-not-defined/
Hoffe konnte damit ein wenig helfen.
Thank you. This worked perfectly for me.
Good post but I noticed that there are various reasons for this error. I found a good post which have listed all possible reasons of this error. Thought of sharing with you.
http://jquerybyexample.blogspot.com/2012/03/various-reasons-and-solutions-of-jquery.html
It was crazy:) I’ve added
define(‘CONCATENATE_SCRIPTS’, false);
define(‘COMPRESS_SCRIPTS’, false);
to wp-config.php and it worked for me.
Huge help. HUGE. Re-uploaded /wp-includes folder. All is well. I was running out of ideas there.
Make sure you do not have magic quotes on in your php.ini file. Found this on my mac local env….
For me, the problem was the .htaccess file left in wp-admin/ by the Bullet Proof Security plugin, which I had disabled and deleted ages ago, because it was crap and causing me lots of problems. I deleted that .htaccess file and everything worked properly again.