Good to know. In my case, I didn’t have the problem on 5.7.0-beta1, only after upgrading to beta2.
I will revert for now – thanks.
Ok – That makes sense. I’ll see if I can override that in the child theme.
Many thanks for pointing me in the right direction.
I’ve raised a ticket asking the developer to change the code:
https://support.advancedcustomfields.com/forums/topic/move-in-line-javascript-to-document-ready/
Here is the page with the errors: http://new.berkshirefilm.com/add-new-person/
There are loads of scripts that load at the end of the page including some from the theme.
Since wrapping the ACF jQuery in a document.ready function gets rid of the errors, is there any reason not to change your code to do this?
There are no other errors in the console, which is why I thought it was an ACF issue. I can only assume that something in the theme is blocking the ACF code from running. I will report back once I hear back from the theme author.
Ok – using a different theme, the problem goes away. I will raise the issue with the theme author.
Thanks for the quick response.
Anything being done to fix this? I have the latest version of the plugin, latest WP core and have the same Jquery error.
For now, I have changed the plugin code to wrap the inline jquery calls with jQuery(document).ready. I also needed to change it in the api.php file, line 1243.
I hope this helps to provide a fix. Clearly, we shouldn’t need to hack the plugin code to make it work.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.