Image Image Image Image Image Image Image Image Image Image | December 12, 2019

Scroll to top


No Comments

WordPress 3.9.1, Javascript “TypeError: a is undefined”

WordPress 3.9.1, Javascript “TypeError: a is undefined”
  • On May 17, 2014

Update: WordPress released Jetpack 3.0.0, followed closely by 3.0.1 claiming that it works 100% with WordPress 3.9.1 “according to its author.” (Spoiler alert, it doesn’t.) There seems to be a problem now in the Publicize & Related Posts features of Jetpack, making them the features I have to toggle off when I want to write a new blog post – which is terrible since Publicize is the one you want turned on when you post. Continue…

For the past couple weeks, I have been unable to insert media into my WordPress Posts, or even see the Media listed out in the Media Gallery.

Today I decided to bust out the web developer console and take a look at any error messages that came up in Firefox. There was one…

x| TypeError: a is undefined

Unfortunately it’s an error spit out by jQuery, which is totally useless in tracking back to the actual problem.

Wordpress LogoI am using the 2014 Theme from WordPress, and a short list of 10 plugins:

  • Akismet
  • Bad Bahavior
  • Google Authorship
  • Jetpack by
  • Limit Login Attempts
  • LinkWithin
  • Post Ideas+
  • Simple Google Sitemap XML

I disabled every plugin I had, and suddenly I was able to view the Media Gallery. Then I started enabling them one-by-one, and it turned out Jetpack was the culprit.

I started disabling each individual Jetpack feature:

  1. Click the Learn More button
  2. The “Configure” button becomes a Deactivate button
  3. Click the Deactivate button

Jetpack LogoI went through them 4 at a time, starting with the first row, and tested the Media Gallery again, and it started working. So I enabled them one-by-one and it turned out the Publicize and Jetpack Comments features were the issue, however while turning plugins back on, I discovered that, Simple Google Sitemap XML, Post Ideas+, and Limit Login Attempts plugins also cause the issue. So they have been removed/deactivated too.

This really sucks, since I count on the publicize feature to send my stuff to’s respective social media pages…and the comments feature made commenting really nice (though I haven’t had a comment on a page here in a long time). And the Limit Login attempts is a good security feature to have.

One thing to note: these Jetpack features and plugins just happened to be the issue for this one particular blog of mine. I have others  that use similar plugins and features, even these causing the issue, and the Media Gallery works just fine on them. If you’re having a similar issue, follow this methodology and disable everything that isn’t a vanilla install of WordPress until the problem stops. Then re-enable all the features you really want to include until the problem comes back.

Submit a Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.