• Resolved wmamber

    (@wmamber)


    I updated from version 0.8.9.5 to 0.9.0.2 and I cannot access the ACF Field groups from within the WP Dashboard. I reinstalled the older version of this plugin and can now access them. Just reporting this bug.

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter wmamber

    (@wmamber)

    The only plugins in mu-plugins are the Pantheon plugins, I think it basically prevents plugins from auto updating, maybe there is a conflict with Pantheon and ACF Extended? I did a search in that folder and I do not see anything related to ACF. I tried removing those and still no local files.

    Thread Starter wmamber

    (@wmamber)

    The only plugins in mu-plugins folder are the Pantheon plugins. I think those plugins prevents plugins from auto updating, maybe there is a conflict with Pantheon and ACF Extended? I did a search in that folder and I do not see anything related to ACF. I tried removing those and still no local files.

    Thread Starter wmamber

    (@wmamber)

    The only plugins in mu-plugins are the Pantheon plugins, I think it basically prevents plugins from auto updating, maybe there is a conflict with Pantheon and ACF Extended? I did a search in that folder and I do not see anything related to ACF. I tried removing those and still no local files.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Thanks for the details and the screenshots.

    I think I found something. Please allow me some time, I’m coming back to you soon.

    Regards.

    Thread Starter wmamber

    (@wmamber)

    Sounds good, thanks for looking into it.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Okay I managed to found what was causing the issue. Good catch! It was a sneaky one.

    First, sorry for taking you through so many debugging stages. Isolating a basic feature like this one, by disabling everything, often solves 95% of cases, that’s why I kinda insisted.

    I’m not sure if you’re very familiar with ACF Extended, so I would like to provide some context to help you understand the problem, since your website seems quite dependent on ACF.

    Context about the “Local” tab: This tab is added by ACF Extended and lists all Local Field Groups. These Field Groups are registered via code with acf_add_local_field_group() and are not present in the database (the “All” tab). The “local” tab helps developers to take a look at which field groups are registered either by themself (some like to register in PHP only), or by a custom plugin.

    Context about PHP files in /acfe-php/: These files are automatically generated by ACF Extended when a Field Group is created in the database via the ACF UI, and when the “PHP AutoSync” setting is enabled in the sidebar. It is the equivalent of the native ACF Json Sync, but with PHP files. This feature improves the database performance, since Field Groups are loaded from PHP files instead of the database on the “Post Edit” screen, for example.

    A typical usage of the PHP AutoSync, is a Field Group in the database (“All” tab), so you can edit the Field Group normally, and a PHP file in the /acfe-php/ folder that is synchronized everytime the Field Group is updated in the UI. Since this feature always comes both ways (DB + PHP), the PHP files are not registered as “local field group” when you visit the ACF UI. However, if the related DB Field Group is missing, it becomes listed in the “Local” tab (your case).

    The developer of your theme has made atypical use of it. It’s not a wrong usage, it is perfectly valid, but yet kinda edge-case as there was no Field group in the DB (“All”), but rather only generated AutoSync PHP files. As a side note, his implementation also improves even more the performance, since there is no Field Groups in database to query.

    Regarding the bug: To keep it short, in order to display the “Local” tab, the code first check if there is any local field groups, if there is none it stops. Otherwise, it adds an exception to include the AutoSync generated PHP files at this moment. Since there was no local field groups, the second part of the code (with the exception) couldn’t be executed. My common debugging environment often has one or two field groups registered locally in Json ready to be tested, that’s why I couldn’t reproduce the issue at the first glance.

    I’ve planned to add a fix in the upcoming patch. In the meantime, you can apply a hotfix by yourself, using one of these two methods:

    Edit the file: /acf-extended/includes/field-groups/field-groups-local.php at line:314. Find this code, and remove it:

    if(empty($local_field_groups)){
        return array();
    }

    Or, if you don’t want to edit the plugin source code, you can add the following code in theme’s functions.php file instead:

    // ACFE 0.9.0.2: Fix 'local' tab missing
    add_action('acf/init', function(){
        acf_add_local_field_group(array('location' => false));
    });

    Note this solution will add an empty local field group in your “Local” tab as a side effect. This field group will have no effect other than that.

    One last thing before I finish. As you mentioned, you used the “Sync back to DB” button in the “Local” tab to retrieve a Field Group in the database. Since your local field groups are generated with AutoSync PHP, it means that once you “Sync a field group back to DB”, it will become synchronized again, and the said Field Group won’t appear in the “Local” tab anymore. This is normal. Also, please note that if you delete the Field Group in the database, it will also delete the related PHP file.

    I hope the issue is a bit more clear. Sorry for the lengthy answer, but I thought it was important to provide some context.

    I’ll let you know once the new patch is up, so you can remove the hotfix.

    Thanks, and sorry for the inconvenience.

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Just a heads up to let you know the latest 0.9.0.3 version fixed this issue. Your “Local” Field Group tab should now be working correctly.

    Thanks, and sorry again for the inconvenience.

    Have a nice day!

    Regards.

    Thread Starter wmamber

    (@wmamber)

    Thanks @hwk-fr !

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Updated to version 0.9.0.2 and now ACF Fields are missing from dashboard’ is closed to new replies.