Stefan Ledin

Can’t save settings in WordPress?

I’ve stumbled across a very strange and annoying issue in WordPress 4.3. It happens when I’m trying to save/update settings on an ACF Options page. When the Save button is pressed, the JavaScript error below is thrown and the new settings can’t be saved.

Uncaught TypeError: Cannot use 'in' operator to search for 'length' in 0

I found the solution in this thread on the .org forum. The problem has to do with jQuery 1.11.3 and the solution is to simply replace wp-includes/js/jquery/jquery.js with jQuery 1.11.0 for example. Any other version besides 1.11.3 or 2.1.4 would do the trick!