Categories
Tech Fixes Technology thepizzy.net

WordPress 3.9.1, Javascript “TypeError: a is undefined”

How to fix WordPress Media Gallery display issue and javascript “TypeError: a is undefined” error

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 WordPress.com
  • 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 thepizzy.net’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.

By [[Neo]]

I am a web programmer, system integrator, and photographer. I have been writing code since high school, when I had only a TI-83 calculator. I enjoy getting different systems to talk to each other, coming up with ways to mimic human processes using technology, and explaining how complicated things work.

Of my many blogs, this one is purely about the technology projects, ideas, and solutions that I have come across in my internet travels. It's also the place for technical updates related to my other sites that are part of The-Spot.Network.

Leave a Reply

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