Support

Account

Home Forums Add-ons Options Page Uncaught ReferenceError: acf is not defined Reply To: Uncaught ReferenceError: acf is not defined

  • As mentioned above, the problem seems to be the load order.

    To ensure that jquery is loaded before various inline scripts get executed, we did the following:

    Replace
    (function($) { ... })(jQuery);
    with
    jQuery(document).ready(function() { ... });
    in
    …/wp-content/plugins/advanced-custom-fields/core/controllers/input.php line 102
    …/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php line 560

    This solved our issues both regarding non-reponsive “Add image” buttons, as well as some conditional logic used to toggle field visibility.

    Hope this may be of help to someone, and a big thanks to Elliot for a great plugin.