Title: Problem with WP 4.5
Last modified: August 31, 2016

---

# Problem with WP 4.5

 *  [Zargarov](https://wordpress.org/support/users/zargarov/)
 * (@zargarov)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/)
 * If plugin is active then Add Media in editor dont’t work.
 * [https://wordpress.org/plugins/headspace2/](https://wordpress.org/plugins/headspace2/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/problem-with-wp-45/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-wp-45/page/2/?output_format=md)

 *  [Lee Willis](https://wordpress.org/support/users/leewillis77/)
 * (@leewillis77)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275357)
 * Yep, headspace is causing JS errors on WP 4.5:
 * `$( 'a[href=#toggle]' ).click( function(){`
 * triggers:
 * Syntax error, unrecognized expression: a[href=#toggle]
 *  [Mike Hampton](https://wordpress.org/support/users/wickedmike/)
 * (@wickedmike)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275382)
 * Stops media uploads, screen options and tagging.
 *  [Austin Ginder](https://wordpress.org/support/users/austinginder/)
 * (@austinginder)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275421)
 * For my site, it’s breaking anywhere I’m using Advanced Custom Fields on the admin.
   Confirmed this is an issue as found the following lines of code.
 *     ```
       wp-content/plugins/headspace2/js/headspace.js
       26:  	  $( 'a[href=#toggle]' ).click( function(){
       61:    		  $( 'a[href=#toggle]' ).click( function(){
       ```
   
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275454)
 * And that is the issue outlined here: [https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7](https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7)
 * > WordPress includes the latest version of jQuery 1.12, which was released back
   > in January: [https://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/](https://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/)
   > It has been discovered that old versions of jQuery worked with an incorrect
   > syntax. That bug was one amongst many bugs fixed in jQuery 1.12. The symptom
   > of this problem is the following message (or something very similar) in the
   > Javascript console when viewing the site in a browser:
   > Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href
   > =#])
   > This is a bit of code that is in somewhat common usage. The problem is that
   > it is incorrect. The link location (hash marks, #, in this case) should be 
   > quoted: a[href*=”#”]:not([href=”#”])
   > Another example would be a[href=#scroll-to-top] which, when written correctly,
   > should be a[href=”#scroll-to-top”]
   > This can happen in other ways too, this is just one commonplace example. The
   > signs that distinguish this problem are the href and the hash mark (#).
   > So, what a lot of people are finding out now is that a whole lot of Javascript
   > code out there was doing-it-wrong all this time, and they never noticed because
   > jQuery incorrectly worked with that particular style of broken code. Once WordPress
   > upgraded, and people got the new jQuery, people are now seeing those bugs in
   > their own code.
   > All that broken Javascript code will need to be fixed. Fortunately, it’s a 
   > pretty simple fix, but in the meantime, it’s still broken.
   > The best advice we can give you is to update all your plugins and themes to
   > the latest versions by their vendors. Plugin and theme authors should be looking
   > to the JS libraries they use for fixes, and including those newer versions 
   > of the affected libraries in their code.
 *  [ralpheastwood](https://wordpress.org/support/users/ralpheastwood/)
 * (@ralpheastwood)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275490)
 * This is exactly the problem I’m facing. I updated all the plugins (at least those
   that could be updated!) – but still the problem persists. What’s the solution
   please?
 *  [Jacob](https://wordpress.org/support/users/jsolis/)
 * (@jsolis)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275544)
 * If your problem is related with headspace, then go to:
    wp-content/plugins/headspace2/
   js/headspace.js
 * Line 26:
    Change: $( ‘a[href=#toggle]’ ).click( function(){ With: $( ‘a[href=”#
   toggle”]’ ).click( function(){
 * Line 61:
    Change: $( ‘a[href=#toggle]’ ).click( function(){ With: $( ‘a[href=”#
   toggle”]’ ).click( function(){
 *  [Jeff McNeill](https://wordpress.org/support/users/jeffmcneill/)
 * (@jeffmcneill)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275576)
 * Jacob has the winning post.
 * The only change is in two places to put double quotes around #toggle in /js/headspace.
   js, as noted lines 26 and 61, but a search and replace would find them easily.
 * That’s it, works great again. Maybe time to fork this plugin so that we don’t
   have to keep hacking edits. This and the Goodey’s redirection plugin ([https://wordpress.org/plugins/redirection/](https://wordpress.org/plugins/redirection/))
   are really important, and just need a bit of maintenance every so often.
 *  [WereBear](https://wordpress.org/support/users/werebear/)
 * (@werebear)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275619)
 * Bless you for this. Fixed! I have eight years worth of SEO built into my posts
   with this plugin.
 *  [Sorbing](https://wordpress.org/support/users/sorbing/)
 * (@sorbing)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275628)
 * I solved the problem by replacing a plugin on Yoast SEO. I wrote a post “Hot 
   to import meta-data from HeadSpace2 to Yoast SEO” – [http://onedev.net/post/709](http://onedev.net/post/709)
 *  [Itsuko Miyake](https://wordpress.org/support/users/torikumo/)
 * (@torikumo)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275656)
 * And
    page-settings-edit.php Line 19 `Change:<a href="#toggle"><?php _e ('advanced','
   headspace'); ?></a>`
 * `With:<a href="#toggle" id="hs-toggle"><?php _e ('advanced', 'headspace'); ?>
   </a>`
 * Thank you blog
    [http://irec.jp/wordpress/wordpress4-5-headspace2/](http://irec.jp/wordpress/wordpress4-5-headspace2/)
 *  [GaryManners](https://wordpress.org/support/users/garymanners/)
 * (@garymanners)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275666)
 * [@jacob](https://wordpress.org/support/users/jacob/) – the hero here.
    His fix
   worked. I lost half a day trying to figure out this before I realized it was 
   the plugin.
 * If would be great it some one forked this.
    I’ve used Yoast and All-in One but
   they are too bulky, too many options. I like Headspace2 because it cuts to the
   chase and does the SEO essentials well.
 *  [GaryManners](https://wordpress.org/support/users/garymanners/)
 * (@garymanners)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275669)
 * I just spent a few hours looking around for good replacements for Headspace2.
 * I like Greg’s High Performance SEO [https://wordpress.org/plugins/gregs-high-performance-seo/](https://wordpress.org/plugins/gregs-high-performance-seo/)
 * also Add Meta Tags looks like a good replacement for headspace2 , though a little
   geeky in it’s assumption of tech language. [https://wordpress.org/plugins/add-meta-tags/](https://wordpress.org/plugins/add-meta-tags/)
 * There is also a converter which promises to convert your Headspace2 data to the
   other plugins (works with the two above mentioned plugins.) :
    SEO Data Transporter:
   [https://wordpress.org/plugins/seo-data-transporter/](https://wordpress.org/plugins/seo-data-transporter/)
   I used this to convert a site with about 20 pages and as many posts that used
   Headspace2. Converted to Greg’s HP SEO and it seems like it worked.
 * I don’t work for any of the above plugins, just though it might help the other
   folks finding who stumbled upon this post in their attempts to fi their headspace2-
   4.5 compatibility issue.
 * -cheers,
    GM
 *  [michaelopdenacker](https://wordpress.org/support/users/michaelopdenacker/)
 * (@michaelopdenacker)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275677)
 * I confirm that Torikumo’s change was needed too, at least in my case, where Jacob’s
   changes were not sufficient.
 * Many thanks!
    Michael.
 *  [Jeff McNeill](https://wordpress.org/support/users/jeffmcneill/)
 * (@jeffmcneill)
 * [10 years ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275685)
 * I want to get a new version of Headspace into the plugins library, but the WordPress
   plugin folks require a lot more refactoring/security changes before they will
   let it in.
 * In the meantime, I’ve put my version (bugfixes only, no features/refactoring)
   up on Github. Feel free to contribute, add or comment on Issues, etc. I’ve been
   using Headspace for years and years and see nothing that has the simple and clean
   functionality.
 * [https://github.com/jeffmcneill/apex-headspace](https://github.com/jeffmcneill/apex-headspace)
 *  [Michael Visser](https://wordpress.org/support/users/visser/)
 * (@visser)
 * [10 years ago](https://wordpress.org/support/topic/problem-with-wp-45/#post-7275690)
 * Hi [@johnny5](https://wordpress.org/support/users/johnny5/), are you in a position
   to comment on this and whether a minor Plugin release will be announced to resolve
   this jQuery issue?

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/problem-with-wp-45/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-wp-45/page/2/?output_format=md)

The topic ‘Problem with WP 4.5’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/headspace2.svg)
 * [HeadSpace2 SEO](https://wordpress.org/plugins/headspace2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/headspace2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/headspace2/)
 * [Active Topics](https://wordpress.org/support/plugin/headspace2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/headspace2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/headspace2/reviews/)

 * 18 replies
 * 15 participants
 * Last reply from: [Baden](https://wordpress.org/support/users/baden03/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/problem-with-wp-45/page/2/#post-7275694)
 * Status: not resolved