I have a very simple site that I've modified a very small amount. After installing the Yoast SEO plugin I found that it broke the in post media attach/upload. I'm about 80% sure it's related to Jquery but I'm unable to find anything that refer's to it enqueuing anything.

I tried forcing an enqueue from functions.php but it didn't help. Any assistance would be appreciated.

function my_init_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');
    wp_enqueue_script( 'jquery' );

add_action('init', 'my_init_method');
  • 2
    Zach, please expound upon your reasoning for blaming 1) jQuery and 2) Yoast's SEO. Log output, etc. Also, please enable WP_DEBUG and look for any errors there. Post the results here and we'll see what we can do.
    – ZaMoose
    Mar 31, 2011 at 11:02
  • Also, please explain the "modified a very small amount." In WordPress, even a tiny change can have a huge impact ... particularly when jQuery is involved. jQuery 1.5 is actually not working with WordPress (no matter what plugins you use!)
    – EAMann
    Mar 31, 2011 at 13:56
  • Wow, ok.. I have changed anything within functions.php I haven't added any enqueues or scripts to the site. I've simply modified the css and added a few plugins which I've used for numerous sites. Broken Link Checker, Custom sidebars, DDSlider, Google Analytics for WordPress, Gravity Forms, Image Widget, Magic Gallery, WordPress SEO and WP-DBManager. I disabled/enabled every plugin until I found what was causing the media upload to break. And that happened to be Yoast SEO. Mar 31, 2011 at 16:00
  • Regarding using the debug tool, I'm unsure how to even begin there. I'll have to take a look at the documentation later on. Unless you have a quick suggestion. Mar 31, 2011 at 16:00
  • Add the following to your wp-config.php: define(WP_DEBUG, true);
    – ZaMoose
    Mar 31, 2011 at 19:21

1 Answer 1


You have introduced 2 additional problems by adding the jQuery from Google CDN.

  1. The admin interface needs jQuery called in no conflict mode so it won't interfere with the other scripts WordPress uses for the dashboard.
  2. The WordPress dashboard is not yet compatible with jQuery 1.5 thats why it was pulled from trunk right before 3.1 was released.

See: WordPress Development Blog.

If you want to use Google's jQuery register it like this:

function my_init_method() {
    if (!is_admin()) {
     wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');
    wp_enqueue_script( 'jquery' );

add_action('init', 'my_init_method');

Also your using DDSlider and Magic gallery and both use timthumb.php which can cause problems with the default WordPress media functions.

ThemeForest plugins and themes are well known to screw with anything having to do with jQuery even after deactivation.

Almost all Themeforest plugins and themes add their own jQuery via script tags.

I would suggest first removing your enqueue script or change it not to use it in the admin then use Firebug and find out where the breakpoint point is.

Make sure your browsers cache is cleared after you disable any of the plugins for testing.

Another thing you can try is disabling the Ajax meta descriptions in the Yoast plugin and see if that makes a difference.

  • Thanks Chris! You're welcome to take a look at the site bulldogfencespokane.com I had no idea that codecanyon/themeforest plugins were poorly written. Mar 31, 2011 at 20:01
  • Just because some are, doesn't mean all are. I've had good experience with TF.
    – nobody
    Apr 3, 2011 at 11:36
  • @Thomas McDonald Yes you are right they do have some good themes and plugins available but until the enforce WordPress coding standards they will continue to get the bad wrap.
    – Chris_O
    Apr 3, 2011 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.