Support

Account

Home Forums Backend Issues (wp-admin) ACF not saving fields – tried everything

Solving

ACF not saving fields – tried everything

  • Hey Guys,

    I am having the same problem that a few people discussed about in the forum however we couldn’t find a solution.

    We got to a point that the fields doesn’t save anymore.

    We have a couple of Repeaters and Flexible Content all together in one of our Custom Post Types.

    max_input_vars is on 500000 (Very large number) but still not working.

    If i move the field up and down it gets saved however the last one it wont get saved at all and we need to include a couple of new ones.

    Do we have any limits for repeater or flexible content being saved?

    Anything else to make it work? Any magic? Please HELP!!!!!!

    Details.
    – WordPress – Version 3.8.4
    – Advanced Custom Fields: Repeater Field – Version 1.1.1
    – Advanced Custom Fields: Flexible Content Field – Version 1.1.1 |

    Kind Regards,
    Andre.

  • besides max_input_vars there are other things that can cause this, max_input_nesting_level & max_input_time may also cause problems.

    As you say, if you move it further up it gets saved and the later ones do not. This is definitely a problem with the input not getting there and not a problem with ACF itself.

  • I’m having trouble getting custom field values to save. I have increased the values of all of these variables to:

    • max_input_vars 18000
    • max_input_nesting_level 500
    • max_input_time 500

    I still cannot save my fields.

    I think the issue might have to do with having imported the database from a different WP install. The fields that were created for the old install continue to save. But any new fields I create don’t save. The new install is running on a localhost server. Also, I’m not using any caching.

  • There is one other thing that can cause fields not to save.

    This could happen with nested repeater fields and flexible content fields on options pages and for taxonomy terms, it should not happen to custom fields for posts. It can happen if the generated option_name value is longer than 64 characters.

    Is it repeater fields or flexible content fields on options pages or for terms? If so, what are the names of these fields and all of the nested fields?

    If you imported the database, including any schema changes to the wp_options table then this should not be a problem, but it is something to check. What happens is that the option_name value will be truncated when saved then it cannot be retrieved later.

  • I have repeater fields in a field group specific to one page. They won’t save. I’ve also tried creating simple non-repeating text fields on pages. They won’t save either.

    I can create new fields on field groups that were created for the previous site. Fields in the old groups do save.

  • Regarding field names, they are short.
    field group is Front Page
    repeater field is Slider
    sub-fields are slider image, slider header, and slider text

    Also, non-repeating fields added to the same group will not save.

  • Same problem here… and getting desperate…

    Checked max_input_vars, nesting_levels, input_time… Also changed option_name to 255 chars… Nothing.

    No errors neither in php logs, apache or mysql. No slow queries… I’ve debugged with save_post and acf/save_post and the array is complete in WP debug.log (it includes the not saved fields)… But they do not save to the DB…

    This behavior started after adding a repeater field in a field group. I had a lot of custom posts with custom fields working fine. Then realized I needed one more repeater field and added to the field group… This made the fields stop saving…

    Some magic would be greatly appreciated 🙂

    Latest version of WordPress and ACFPro at this time.

  • Well… One thing to test and worked for now… I’ve duplicated the field group with the repeater fields created… Deleted the original one and renamed the copy with the same name as the original…

    It’s working… for now…

    Makes this sense to anyone? 🙂

  • Just an update… This method will save the new created fields, but in my case generated a bunch of errors related to array offsets in the template.

    So the solution for me was to create a new Field Group with the new needed fields. This case the fields are saved and shown.

  • I’m having the same problem, but I don’t use Repeater. I create a new ACF group and it simply doesn’t save the fields, even it’s said they’ve been created. Anyone?

  • Just here to say a ‘me too’…. although I’m not sure if it’s exactly the same problem.

    After upgrading an older install to ACF Pro 5, I’ve realised I’m unable to add any new fields at all. I don’t have the old field groups in the interface anymore (they were exported to PHP and and are included in the theme), so I’m creating a brand new field group. That works fine, but any fields created within it do not save – on saving, the page just loads again with no fields.

    I’ll probably get around this for now by writing it all in the PHP; I was just hoping to save myself a bit of time by create complex fields in the interface so I didn’t have to write them all manually.

    Still interested in a fix if anyone has managed to solve this – if indeed this is the problem the OP was seeing!

  • Hi @tdmalone,
    I had this same exact issue a while back and found it was actually how the custom field keys were being saved in the database. Essentially, once you reach a certain character limit (length) inside the database for these keys, they stop saving. I brought this up to ACF support and was directed to purchase the ACF PRO version as they save these fields in a different fashion and with greater lengths. After upgrading to ACF pro, the issues stopped happening and now have very complex nested repeaters that work flawlessly. Also to note, you will not lose any custom fields or data you have created in the regular version as ACF PRO imports all of the old info. Hope this helps.

  • Thanks for the reply @jasonblackdog – I mentioned I was already on ACF Pro 🙂

  • Hi @tdmalone,
    Yes, I was just sharing my experience with this issue as well. Regarding your issue, have you looked at the wp_options table to increase the options_name character length? See here: Link

    Another possible similar issue was addressed using the .htaccess file and increasing the php memory limit. See here: Link

    Please let me know if any of this helps.

  • @tdmalone

    Just want to make sure.. you say you updated to ACF 5. Did you follow the update procedure to make sure your fields where migrated correctly?
    https://www.advancedcustomfields.com/resources/upgrading-v4-v5/

  • I had this issue and tried everything with no success. In the end it turned out to be the ‘pre_get_posts’ action in my functions.php that was set to limit posts_per_page to 10 that also set the limit for the number of fields in a field group for some reason.

Viewing 16 posts - 1 through 16 (of 16 total)

The topic ‘ACF not saving fields – tried everything’ is closed to new replies.