I am looking through ACF’s code. The function that supposed to return the field groups for an ID is:
/*
* acf_get_field_group
*
* This function will take either a post object, post ID or even null (for global $post), and
* will then return a valid field group array
But that’s not returning anything. Not even an empty array.
So.. I removed the $post_id and all field groups are returned. With the post_id no field groups are returned. I hardcoded the ID so that I was sure the correct value was being passed, but I still get an empty array. I am not trying to modify the values. I just want to loop through each field group, and print a different layout for each one.
Thanks John.
acf_get_field_groups is returning an empty array. If I remove the post_id then all field groups are returned.
Is this documented somewhere? I also saw that some filters changed to functions on v5, but I haven’t found any new documentation.
I can’t get the plugin to update to 5.3.1. The license is there, when I check for updates, it tells me that there’s a new version. But when I click on update it just takes me to the plugin update page where there’s no update to be made.
Any ideas?
You can achieve the same thing using get_field_objects($post->ID);
I am also having the same issue. Looks like this filter no longer works in V5
$fields = apply_filters(‘acf/field_group/get_fields’, array(), $field_group_id);
@dalton,
Thanks for letting me know about this plugin. This seems to be exactly what I am looking for. I will give it a try.
Yep. So I could grab the metaboxes order of one user and apply to all other users. But unfortunately, as you mentioned, the order is saved by post type, which unfortunately is not enough filtering (need this ordered on a per page basis).
I will see if I find any other way to accomplish this. Thanks.
I am aware of that, but that means that the order will be wrong at first. I will see if there’s a way to programmatically change the order for every user, and perhaps remove the drag and drop. The goal is to lock the collection of fields as a template that the client can’t change/break.
Never mind I found out how to add it via functions in the DOCs. Thanks.
The default message of a flexible field that hasn’t been used yet is “Click the “BUTTON NAME” button below to start creating your layout”. Since it’s just one field, perhaps it should say something else instead of the word “layout”. Or perhaps let this option be the default, but gives us the option to write another message.
After much research and much reading… I found the answer via another post on this website. I had to increase my php settings to allow more variables to be inputed.
max_input_vars = 3000
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000
The post with the answer:
http://support.advancedcustomfields.com/forums/search/?bbp_search=max_input_vars+%3D+3000
Eliot, I know this issue is not related to your plugin, but just a php setting. However since it seems like a few people have already experienced the same issue, maybe you could have common solutions as this one placed somewhere easy to find in your support forum.
I’ve upgraded the memory_limit to 256M both in php.ini and config.php. i have no errors logged.
######## UPDATE ##########
I decided to run a test.
1. I got a new WP installation up.
2. Used WP default theme
3. Installed ACF only (no add-ons)
4. Added new field group
5. Started adding field by field. Field1 / Update – Field2 / Update and so on…
After I reached Field57 no more fields can be saved. Not only the fields, but any settings below that last field. “Locations” (if statements) and “Options” (hide/show metabox) won’t save.
If I remove one field. I am able to save the options and I am able to add another field.
I have a VPS. So I set it up to have 256M of memory_limit. I also set WP to have the following:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
define(‘WP_MAX_MEMORY_LIMIT’, ‘256M’);
I read in the codex that WP_MEMORY_LIMIT only works on the front-end and that WP_MAX_MEMORY_LIMIT is for the backend.
I also checked error logs in the public_html folder and in the theme folder. There are no errors.
ACF is the only plugin installed.
There are no pages/posts or extra amount of content that could slow down the page on save.
The ACF field page itself, throws no errors. It does not take long to load once you click on “Update”.
While trying to trouble shoot the issue. I also noticed that there’s a glitch with the “update” button and WP 3.8. The button is initially red (theme color), but once the page has loaded the button goes back to “blue” which was the original color before WP 3.8.
I am on iOS Mavericks 10.9.1
I tried adding more fields using the latest versions of Safari, Firefox and Chrome. My primary browser is Chrome.
##########UPDATE############
I downgraded the plugin to version 4.1.0
I was able to add 17 more fields. So I am now on Field74. After adding field 74, I run in to the same issue again.
I am still running more test.
I ran into this same issue again. This time no log errors. It seems that once I have too many fields I run into saving issues. Currently, all fields save, but the Rules conditions are not. So weird.
Thank Elliot. I will check github.
Hi,
I ran into the exact same problem as Hube2 today. Elliot, you said the problem was fixed, did you release the update? I’m still having the exact same issue. I can’t pick a specific “page” of a custom post type.
I had the same problem as described here. A hard refreshed solved my issues. Thanks.
Elliot,
I could not find any specific error related to ACF. I did find other errors, and so I took care of them, and so far ACF is back to normal. Thanks for your help.
Thanks Elliot,
That plugin does it. It will help me to organize the layout better.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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.