The site we are working on has broken in the last week and we have no idea what is going on. Here is a list of issues, and the steps we've taken to troubleshoot them:
- In our API call we are using get_field() and get_fields() to request data from a repeater, but from time to time this returns null, false, or the length of the array. All the content is still in the database.
- When trying to create new repeater content the child fields of the parent repeater field will not save on first save, but once re-added can be saved afterwards.
- When creating new fields (any field, not just a repeater) the key will change from the field_xxxxxxxxxxxxxx format to be the same as the name i.e short-description.
- Old repeater fields can be updated or saved to, whereas new ones won’t save data.
Troubleshooting Steps
- Deactivated all plugins
- Clean install of ACF PRO 5
- Changed WordPress user permissions to default settings: https://www.stevejenkins.com/blog/2015/09/correct-permissions-for-wordpress/
- Used WP Optimize and Sweep plugins to clean DB
- Increase our max_vars settings: https://www.advancedcustomfields.com/resources/limit-number-fields/
- Tried this way to register post types: https://www.freshconsulting.com/wordpress-custom-post-types-advanced-custom-fields/
- Attempted to build field groups with PHP in functions file (nothing happened): https://www.advancedcustomfields.com/resources/register-fields-via-php/
- Attempted to build fields from exported JSON files, changing the keys to be unique (field group was visible through the dashboard, but some fields wouldn’t import, not saving error still persists, and adding the field group to a post type is buggy)
Thanks in advance for any guidance you're able to provide :)