{"id":1579,"date":"2014-05-17T11:55:54","date_gmt":"2014-05-17T17:55:54","guid":{"rendered":"http:\/\/thepizzy.net\/blog\/?p=1579"},"modified":"2014-05-22T21:38:27","modified_gmt":"2014-05-23T02:38:27","slug":"wordpress-3-9-1-javascript-typeerror-a-is-undefined","status":"publish","type":"post","link":"https:\/\/thepizzy.net\/blog\/2014\/05\/wordpress-3-9-1-javascript-typeerror-a-is-undefined\/","title":{"rendered":"WordPress 3.9.1, Javascript &#8220;TypeError: a is undefined&#8221;"},"content":{"rendered":"<p><strong>Update:<\/strong> WordPress released Jetpack 3.0.0, followed closely by 3.0.1 claiming that it works 100% with WordPress\u00c2\u00a03.9.1 &#8220;according to its author.&#8221; (Spoiler alert, it doesn&#8217;t.) There seems to be a problem now in the <strong>Publicize &amp; Related Posts<\/strong>\u00c2\u00a0features of Jetpack, making them\u00c2\u00a0the features I have to toggle off when I want to write a new blog post &#8211; which is terrible since Publicize\u00c2\u00a0is the one you want turned on when you post. Continue&#8230;<\/p>\n<p>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.<\/p>\n<p>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&#8230;<\/p>\n<pre>x| TypeError: a is undefined<\/pre>\n<p>Unfortunately it&#8217;s an error spit out by jQuery, which is totally useless in tracking back to the actual problem.<!--more--><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1582\" data-permalink=\"https:\/\/thepizzy.net\/blog\/2014\/05\/wordpress-3-9-1-javascript-typeerror-a-is-undefined\/wordpress-logo-notext-rgb1\/\" data-orig-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1.png?fit=500%2C500&amp;ssl=1\" data-orig-size=\"500,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Wordpress Logo\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1.png?fit=500%2C500&amp;ssl=1\" class=\"alignright size-thumbnail wp-image-1582\" src=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1-150x150.png?resize=150%2C150\" alt=\"Wordpress Logo\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-notext-rgb1.png?w=500&amp;ssl=1 500w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>I am using the 2014 Theme from WordPress, and a short list of 10 plugins:<\/p>\n<ul>\n<li>Akismet<\/li>\n<li>Bad Bahavior<\/li>\n<li>Google Authorship<\/li>\n<li>Jetpack by WordPress.com<\/li>\n<li>Limit Login Attempts<\/li>\n<li>LinkWithin<\/li>\n<li>Post Ideas+<\/li>\n<li>Simple Google Sitemap XML<\/li>\n<\/ul>\n<p>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 <strong>Jetpack was the\u00c2\u00a0culprit<\/strong>.<\/p>\n<p>I started disabling each individual Jetpack feature:<\/p>\n<ol>\n<li>Click the <strong>Learn More button<\/strong><\/li>\n<li>The &#8220;Configure&#8221; button becomes a <strong>Deactivate<\/strong> button<\/li>\n<li>Click the <strong>Deactivate button<\/strong><\/li>\n<\/ol>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1583\" data-permalink=\"https:\/\/thepizzy.net\/blog\/2014\/05\/wordpress-3-9-1-javascript-typeerror-a-is-undefined\/logo1\/\" data-orig-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/logo1.png?fit=250%2C200&amp;ssl=1\" data-orig-size=\"250,200\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Jetpack Logo\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/logo1.png?fit=250%2C200&amp;ssl=1\" class=\"alignleft size-thumbnail wp-image-1583\" src=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/logo1-150x120.png?resize=150%2C120\" alt=\"Jetpack Logo\" width=\"150\" height=\"120\" srcset=\"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/logo1.png?resize=150%2C120&amp;ssl=1 150w, https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/logo1.png?w=250&amp;ssl=1 250w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>I 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 <strong>Publicize and Jetpack Comments<\/strong> features were the issue, however while turning plugins back on, I discovered that, <strong>Simple Google Sitemap XML, Post Ideas+, and Limit Login Attempts plugins<\/strong>\u00c2\u00a0also cause the issue. So they have been removed\/deactivated too.<\/p>\n<p>This really sucks, since I count on the publicize feature to send my stuff to thepizzy.net&#8217;s respective social media pages&#8230;and the comments feature made commenting really nice (though I haven&#8217;t had a comment on a page here in a long time). And the Limit Login attempts is a good security feature to have.<\/p>\n<p>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\u00c2\u00a0 that use similar plugins and features, even these causing the issue, and the Media Gallery works just fine on them. <strong>If you&#8217;re having a similar issue, follow this methodology and disable everything that isn&#8217;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.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to fix WordPress Media Gallery display issue and javascript &#8220;TypeError: a is undefined&#8221; error<\/p>\n","protected":false},"author":1,"featured_media":1587,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[910,3,18],"tags":[911,912,523,209,281],"class_list":["post-1579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-fixes","category-tech","category-thepizzy-net","tag-javascript-error","tag-jetpack","tag-plugin","tag-site","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/thepizzy.net\/blog\/wp-content\/uploads\/2014\/05\/wordpress-logo-stacked-rgb1.png?fit=499%2C310&ssl=1","jetpack_likes_enabled":false,"jetpack_shortlink":"https:\/\/wp.me\/prOO4-pt","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/comments?post=1579"}],"version-history":[{"count":9,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/1579\/revisions"}],"predecessor-version":[{"id":1667,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/posts\/1579\/revisions\/1667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/media\/1587"}],"wp:attachment":[{"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/categories?post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thepizzy.net\/blog\/wp-json\/wp\/v2\/tags?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}