Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
hi2

No ACF fields available on Staging

Hi there. I created a staging clone of my site earlier this week and on that duplicate site I see ‘No ACF fields available’. I suspect this has something to do with the staging. subdomain, especially because my host (Siteground) does some strange domain mapping behind the scenes for staging (get_permalink continues to return live URL).

I tried hitting the ‘check license’ button but that didn’t work. Is there a way to manually add a domain to my account and might that help me to get my ACF addon working on staging? It’s worth noting that I don’t get the usual “you need to have the ACF addon installed to use Advanced Custom Fields” message when trying to add AC fields, just “No ACF fields available”. Both the plugin and addon are working correctly on the live site.

It’s not a deal breaker but would be useful to be able to use the filters on staging.

Many thanks

1 month, 1 week ago
Stefan
Developer

Are you using a specific method to load the ACF fiels on your (staging) environment?
Our plugin tries to retrieve the ACF settings from the database or the ACF Json sync feature to determine which fields are available. Also when you enter the ACF groups overview page, do you see your ACF groups to be available on the page?

1 month, 1 week ago
hi2

Thanks for your reply, Stephan and sorry for not getting back to you sooner. I think I might have identified the issue. Essentially it’s because I’ve got my fields set to ‘active => false’ which is preventing them from appearing in the admin columns options.

There is a reason for this setup though whereby I have two forms which appear on the front end of the site (via acf_form) but which I don’t want to be visible in the site admin. I still need to display the meta info entered via those forms in the admin columns. Does that make sense? In my case therefore, it’s no good to have the ‘active’ value determine whether they available for admin columns. I need them to be inactive in the admin but available for admin columns.

1 month ago
Stefan
Developer

Thanks for getting back to me. Although I understand your use case, I can’t do much in our plugin to accommodate your request. We use the acf_get_field_groups() method to retrieve all ACF groups for a specific view (Post Type). That method actively removed any groups that are disabled and based on the meaning for that field, it is actually what I expect that should happen.

So I don’t see a reason why we would change that in our code, but you could have a look in the ACF filter acf/load_field_groups. It runs for all groups and technically you could use it to alter the active state of a group for a specific condition (not tested).

Another workaround is to use our Custom Field column instead of the Advanced Custom Field column, but of course you’ll miss some advanced feature for the more complex ACF fields.

4 weeks ago
hi2

Makes sense, Stefan. I’ll use the custom fields type for now and look into perhaps hiding those fields in the backend by user level in the future instead of just turning them off.

Thanks

3 weeks, 4 days ago

You must be logged in to reply to this topic.