Support

Account

Home Forums Backend Issues (wp-admin) Call to undefined function acf_register_location_type()

Solving

Call to undefined function acf_register_location_type()

  • I cannot save any changes in 5.9.5 (after upgrading from 5.8.9 bc of a bug w/validation preventing changes from being saved). I received the following error. FWIW I do see the function defined in /includes/locations.php.

    Error Details
    =============
    An error of type E_ERROR was caused in line 91 of the file /Library/WebServer/Documents/wp/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-type.php. Error message: Uncaught Error: Call to undefined function acf_register_location_type() in /Library/WebServer/Documents/wp/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-type.php:91
    Stack trace:
    #0 /Library/WebServer/Documents/wp/wp-content/plugins/advanced-custom-fields-pro/includes/acf-utility-functions.php(156): include_once()
    #1 /Library/WebServer/Documents/wp/wp-content/plugins/advanced-custom-fields-pro/acf.php(270): acf_include(‘includes/locati…’)
    #2 /Library/WebServer/Documents/wp/wp-includes/class-wp-hook.php(287): ACF->init(”)
    #3 /Library/WebServer/Documents/wp/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #4 /Library/WebServer/Documents/wp/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #5 /Library/WebServer/Documents/wp/wp-settings.php(557): do_action(‘init’)
    #6 /Library/WebServer/Documents/wp/wp-config.php(94): require_once(‘/Library/WebSer…’)
    #7 /Library/WebServer/Documents/wp/wp-load.php(37): require_once(‘/Library/WebSer…’)
    #8 /

  • Preventing what changes from being made? Please supply more detail about what you are doing when you get this error.

    • dfreire

    • April 5, 2021 at 11:29 pm

    The validation bug is in 5.8.9 and it manifests when a field fails validation. No feedback about the errant field is provided to the user and one is not prevented from submitting the page. So it looks like “Page updated” but it hasn’t.

    That’s really not here or there for this issue however. The 5.8.9 bug was simply the motivation for me to update to 5.9.5, which upon attempting to save any changes, produces the Uncaught Error above.

    HTH, thanks.

  • Any update on the error pasted in my original post?

  • This error is not happening on any of my sites and I cannot reproduce it. Try reinstalling ACF. If that does not work test conflicts with other plugins by deactivating them or try switching themes to see if that clears it up.

    • dfreire

    • April 10, 2021 at 4:54 am

    FWIW, updating via WP continued to generate the error. I had to delete the plugin altogether, re-download it and manually move it into the plugins directory to work.

    I’m still encountering the validation error (no client-side validation and the post appears to save but not changes are saved–gutenberg is NOT enabled) but I’ll submit a new post if I can’t figure it out. Thanks.

Viewing 6 posts - 1 through 6 (of 6 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.