Support

Account

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

Solving

Uncaught ReferenceError: acf is not defined

    • Matt

    • April 19, 2020 at 12:40 pm

    Found a fix that should help some people out to get rid of the acf is not defined console error . I updated the path from the solution of what milemilosheski posted to get it to work.

    <script type='text/javascript' src='https://www.yourdomain.com/wp-content/plugins/advanced-custom-fields/assets/js/acf-input.min.js'></script>

  • Can you explain more? Like I am facing the problem when a user tries to login and they are shown the same page. They have to refresh twice to get logged in. The console is showing acf is not defined. This is happening in all acf used pages

  • The most common reason behind the error “Uncaught ReferenceError: $ is not defined” is executing the jQuery code before the jQuery library file has loaded.

  • If you are using any script file and getting “Uncaught ReferenceError:” which means ‘x’ is either a variable or a method which you are trying to use before declaring it using var keyword. This means that there is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this ‘x’ is not defined error . This usually indicates that your library is not loaded and JavaScript does not recognize the ‘x’.

    To solve this error: Load your library at the beginning of all your scripts.

    There can be multiple other reasons for this issue:

    Path to CDN library you included is not correct
    The library file is corrupted
    Working offline
    Conflict with Other Libraries

Viewing 4 posts - 26 through 29 (of 29 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.