jQuery typeerror invalid ‘in’ operand a after WordPress upgrade

jQuery typeerror invalid - advanced custom fields pro plugin

If you have happened to see this error “jQuery typeerror invalid ‘in’ operand a” in javascript console then it is most probably due to a third party library causing the error. Recently I updated a WordPress core to latest version of 4.4.1 and all of a sudden the ajax based page/post saving functionality of the website broke.



I invested the website to find out the cause of the problem. After disabling all the plugins I was still getting the problem. I wasn’t using any custom javascript code for the backend functionality but still I went to functions.php in desperate need of solving the problem as I had already wasted many hours to find the cause and fix it. When I opened the functions.php and looked through it, I noticed that I was using Advanced Custom Fields Pro plugin by including it through functions.php. I disabled it and voila! The problem was gone. So the culprit was Advanced Custom Fields Pro 5.1.3 and upgrading it to 5.3.2 solved the problem.

If you happen not to be able to save/edit posts/pages after WordPress core upgrade and are using Advanced Custom Fields Pro or any other plugin by using it through include directives then make sure to update those plugins as well.



,