Support

Account

Home Forums Bug Reports Update 5.7.11 Crashes Site

Solved

Update 5.7.11 Crashes Site

  • I confirm the update is working.
    Thank you for the fast response Elliot.

  • Hi Elliot,

    I’ve tried renaming the version, but the update option isn’t showing up on my plugin manager screen. Any idea why this might be? And even once it’s version 5.7.10, I’m still getting the error:
    “Fatal error: Can’t use function return value in write context in /home/cluster-sites/3/i/integrationhub.net/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/local-fields.php on line 304 ”

    Thanks for your quick responses

  • @jamiepr23 – if I’ve read your reply correctly, just renaming the file will not fix the problem.
    Can you update the plugin manually ?
    My process when I need to do this is… (in my cPanel)
    1. Zip up the old plugin folder (as a backup just in case)
    2. Delete the plugin folder
    3. Upload the new zip file
    4. Uncompress it
    5. Check back in WP admin that all is OK
    (sometimes it may need to be activated)

    HTH, Dave

    ps – the two occurrences of 5.7.11 are:
    Version: 5.7.11 (line 6)
    var $version = ‘5.7.11’; (line 21)
    (This is in the acf.php file in the root of the plugin folder)

  • @jamiepr23 If the update does not appear after changing your version number, please manually re-download the plugin files from your account online: https://www.advancedcustomfields.com/my-account


    @bung55
    Thanks for helping, great info!

  • Fantastic, thank you for your help

  • Hello;

    The plugin seems to still break the site even after trying updating the version number in acf.php i get the update available visual but after update and reactivating WP All Import ACF Addon the manager breaks again.

    ACF Pro version currently installed: 5.7.12
    WP All Import ACF Add-on version currently installed: 3.1.9

    The message is the following:

    [19-Feb-2019 17:44:02 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function acf_local() in /path/to/project/wp-content/plugins/wpai-acf-add-on/wpai-acf-add-on.php:469
    Stack trace:
    #0 /path/to/project/wp-content/plugins/wpai-acf-add-on/wpai-acf-add-on.php(243): PMAI_Plugin::init_available_acf_fields()
  • Upgrading our site from ACF Pro v5.7.10 to v.5.7.12 broke our dev site. During the upgrade, there were a few messages errors about “Call to undefined function acf_local()” and WSOD. I tried replacing v5.7.12 with v5.7.9, and that resolved the WSOD, but none of my ACF-based content would render, on the backend or the frontend. At that point I restored from a backup.

    The call to acf_local was in our theme. Is this function going away? If so, what should calls to it be replaced with?

  • I had the same issues with ACF 5.7.12 & WP All Import ACF Add-on 3.1.9. After updating WP All Import ACF Add-on to 3.2.0 the problem was solved.

  • @d-vandeutekom , yes, it worked. we need to update the Wp all import ACF addon to 3.2.0 before updating ACF to 5.7.12.

    In my case, I got fatal error once I have updated ACF pro plugin to 5.7.12

    Call to undefined function acf_local()

    Then, I have downloaded ‘Wpallimport ACF addon’ plugin and have uploaded it manually to the site and error was solved.

  • Is this fixed yet? WP All Import – ACF Add-On (wpai-acf-add-on), currently 3.1.7, can’t be activated without crashing the site. ACF Pro is at 5.7.12

  • What is the status of this:

    Call to undefined function acf_local()

    is that function got deleted?

  • Same problem, acf_local() is still missing. Breaks ACF PHP RECOVERY plugin
    https://github.com/BeAPI/ACF-PHP-Recovery

  • Experienced this same issue with WPAI ACF Addon. I haven’t quite fixed it entirely yet, but I drilled it down (based on the error) to line 473 in /wpai-acf-add-on/wpai-acf-add-on.php.

    $fields = acf_local()->fields;
    
    if ( ! empty($fields) ) {
    	foreach ($fields as $key => $field) {
    		self::$all_acf_fields[] = $field['name'];
    	}
    }

    Then looked at a previous version of ACF Pro and there’s a file includes/local.php that features that class acf_local. In the newest version of ACF, it seems they did a lot of code refactoring. This file doesn’t exist. The closest thing I found was acf()->fields

    I got this partially fixed (no more WSOD) but crashes on the “import” screen of WPAI, so THIS IS NOT A FIX. Maybe it’ll help someone continue with the fix. For me at this point, I’m downgrading ACF to 5.7.10 – where acf_local exists.

    Replace that code above with:

    $fields = acf()->fields;
    
    if ( ! empty($fields) ) {
      foreach ($fields as $key => $field_parent) {
        foreach ($field_parent as $field_child) {
          if (isset($field_child->name)) {self::$all_acf_fields[] = $field_child->name;}
    
        }
      }
    }
  • Experienced this same issue with WPAI ACF Addon. I haven’t quite fixed it entirely yet, but I drilled it down (based on the error) to line 473 in /wpai-acf-add-on/wpai-acf-add-on.php.

    $fields = acf_local()->fields;
    
    if ( ! empty($fields) ) {
    	foreach ($fields as $key => $field) {
    		self::$all_acf_fields[] = $field['name'];
    	}
    }

    Then looked at a previous version of ACF Pro and there’s a file includes/local.php that features that class acf_local. In the newest version of ACF, it seems they did a lot of code refactoring. This file doesn’t exist. The closest thing I found was acf()->fields

    I got this partially fixed (no more WSOD) but crashes on the “import” screen of WPAI, so THIS IS NOT A FIX. Maybe it’ll help someone continue with the fix. For me at this point, I’m downgrading ACF to 5.7.10 – where acf_local exists.

    Replace that code above with:

    $fields = acf()->fields;
    
    if ( ! empty($fields) ) {
      foreach ($fields as $key => $field_parent) {
        foreach ($field_parent as $field_child) {
          if (isset($field_child->name)) {self::$all_acf_fields[] = $field_child->name;}
        }
      }
    }
  • @elliot Can you please take a look?

Viewing 15 posts - 26 through 40 (of 40 total)

The topic ‘Update 5.7.11 Crashes Site’ is closed to new replies.