Support

Account

Home Forums ACF PRO ACF PRO update bug

Solving

ACF PRO update bug

  • Hi guys,

    Elliot here from ACF.

    I’ve just tracked down and fixed a mischievous bug that may delay the ACF PRO plugin from updating. The bug only affects websites that have no other theme or plugin updates available at the time.

    If the ‘Custom Fields > Updates’ page is showing an update, but the ‘Plugins’ page doesn’t, worry no more!

    The fix is simple. Please edit the file: core/updates.php on line 92

    From:

    
    // bail early if no response (dashboard showed an error)
    if( empty($transient->response) ) return $transient;
    

    To:

    
    // bail early if no response (dashboard showed an error)
    if( !isset($transient->response) ) return $transient;
    

    Thanks to those who notified me of this issue and helped get it fixed!

  • Just did the latest update and now I’m unable to load the site or WP – getting the following error:

    Fatal error: Call to undefined function get_current_screen() in /Users/Sites/cms/wp/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3307

    anybody else experiencing this?

  • I updated the file as suggested and unfortunately it still didn’t recognize any updates for ACF

    When I visited wp-admin/update-core.php, the following error showed:

    Fatal error: Call to undefined function acf_is_plugin_active() in /path-to/wp-content/plugins/advanced-custom-fields-pro/core/updates.php on line 101

    I reverted back to the old updates.php file for now.

    Just for information’s sake, the ACF plugin did not recognize any updates regardless if there were other plugins that had updates or not.

    Please let us know what can be done to correct this…thanks!

  • Just a quick update on this. My first attempt to fix was to replace my updates.php file with the one attached to Elliot’s post. This method didn’t fix the update bug for me, as well…it caused a fatal error.

    My second attempt was to manually correct the one line in core/updates.php as described. This actually fixed the problem for me.

    Possibly a problem with the attached file.

  • Thanks for this! For anyone having trouble, here’s what worked for me. Before applying this fix, this is what I was seeing:

    • Plugins → Installed Plugins: no visible update
    • Custom Fields → Updates: Latest Version: 5.4.0, Update Available: Yes (with button to Update Plugin)
    • Clicking the Update Plugin button (wp-admin/plugins.php?s=Advanced+Custom+Fields+Pro) shows ACF PRO with no available update

    After applying Elliot’s fix to core/updates.php, the above was unchanged but doing the following triggered the update for me:

    1. Go to Plugins → Installed Plugins
    2. Select the checkbox next to Advanced Custom Fields PRO
    3. Choose Update from the Bulk Actions dropdown and click Apply
    4. Once the page loads, click Return to Plugins page

    Now there will be an available update for ACF PRO which you can apply normally.

  • Hi guys

    Thanks for the replies.

    Sorry about the PHP error in the attached file. I have removed the file and recommend you manually apply the code fix.

    After making the fix, please also click the ‘Dashboard -> Updates -> Check again’ button to refresh all update info!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.