"Uncaught ReferenceError: acf is not defined" error appearing in console

Created by Phil Kurth, Modified on Thu, 30 Jun 2022 at 01:29 PM by Phil Kurth

If you are seeing this in your console, it means something is interfering with the loading of necessary scripts. This may be caused by some asset optimisation plugins which try to combine all script files into one — they can struggle with dynamically enqueued scripts like the ones for Advanced Forms.


If you try disabling asset optimisation plugins and the problem resolves, you may need to change the configuration for that plugin. 


It's also possible that the jQuery UI scripts have been deregistered in an attempt to improve page load speeds. Advanced Forms depends on ACF which depends on jquery-ui-sortable and jquery-ui-resizable which depend on jquery-ui-core. If any of these lower level dependencies have been deregistered, the top-level dependencies are no longer valid and WordPress won't print the markup necessary to load these scripts. 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article