Support

Account

Home Forums ACF PRO Fields disappear after save

Solving

Fields disappear after save

  • Having the following issue for some time know. To fix it I used version 4.x. In ACF Pro the problem occurs.

    – I create fields in the backend (inside field groups). Different types (tested a lot, nothing seems to change depending on the field type).
    – When I save the group all fields I created are gone.

    Inside the database ACF creates duplicated meta fields on every save.

    I activated JSON to see what’s going on. Surprisingly, every time I hit save in the field group panel a new json file is created inside the “acf-json” folder. Nothing changes inside the file except the group-key and modification number.

    Any idea? I really like to use version 5 instead of version 4.

  • This is not something that’s happening on any of my sites using ACF5. Have you tried the usual things? Deactivating other plugins, using a default theme?

  • Thanks John. The theme caused the issue.

    I used the filter “wp_insert_post_data”, which causes ACF to fail. I used the filter with a priority of 99, maybe this is to high (didn’t tested it).

    One ugly thing I noticed while experiencing this problem was that ACF creates multiple columns inside the database.
    Is there a plan to add a feature to remove all ACF-data stored in the database? When deinstalling the plugin, acf leaves a huge data mess. The same problematic shows up when renaming fields.

  • I’m not the developer, so I can’t say, but I don’t think there’s any plan to include automatic deletion of data created using ACF. I think I’ve seen some plugins or scripts that will do this but I don’t remember where.

  • It doesn’t seem that this important feature will make it into the plugin.
    https://support.advancedcustomfields.com/forums/topic/flush-unused-custom-fields/

    You mean this code snippet here:
    https://gist.github.com/toscani/4d8fd5c5e43b1583e07b

  • Elliot has plans to add it, it’s on his to do list according to that thread, it’s probably not very hight priority list. It’s a complex problem. If there was an easy answer it would probably already be included.

    The script you linked to on github is one of the ones I’ve seen, but I have not tested anything so I cannot say what works and what doesn’t.

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

The topic ‘Fields disappear after save’ is closed to new replies.