On this page
- Category: Getting Started
- Written: June 12, 2012
- Updated: November 19, 2012
Update plugin caused white screen of death
Issue: You have some code in your functions.php file which is dependent on ACF (register_options_page, etc). During the upgrade, the plugin is disabled and the code in your functions.php causes PHP to crash
Solution: Wrap all your ACF dependent code in if(function_exists(‘…’)) statements. This is standard practice for all WP theme development!
Can I duplicate a field group?
Solution: Yes, install the Duplicate Post plugin – http://wordpress.org/extend/plugins/duplicate-post/.
When updating a field group it saves as a post and looses all the data.
Issue: Post Type Switcher plugin or something similar is overriding the post_type value and none of the acf data is saved.
Solution: Disable the post type switcher plugin.
Issue: Post type order plugin is conflicting with ACF
Media library popup is blank
Issue: The media library popup uses a $_GET param called “type”. You also have a taxonomy called “type”
Solution: Change your taxonomy to something other than “type”
Not all repeater rows save!
Issue: Your server is timing out during the saving process
Solution: Increase your php.ini max_vars as discussed here: http://support.advancedcustomfields.com/discussion/3102/repeater-field-losing-fields-on-post-update
My nested repeater is not saving data on the options page
Issue: The wp_options table allows a max character length of 64 in the “option_name” column. Your parent + sub field names are longer than this and can’t save properly
Solution: rename your sub fields to shorter versions (they don’t need to be unique)
I am experiencing strange foreach loop errors throughout ACF!
eg: Warning: Invalid argument supplied for foreach() in…includes/plugin.php on line 1286
Issue: This is an odd bug cause by using the remove_menu_page function on the wrong WP hook
Solution: run your remove_menu functions on the admin_menu hook – http://support.advancedcustomfields.com/discussion/3476/try-to-add-a-039file039-field-and-get-warning-invalid-argument-supplied-for-foreach-in-
How to display 1 row from a repeater