Home › Forums › Add-ons › Flexible Content Field › Flexible Content does not delete post meta properly › Reply To: Flexible Content does not delete post meta properly
Yes. ACF would need to either keep track of what was deleted and submit some kind of delete flag or it would need to query the database before saving and compare the old data to the new data before saving. The final choice would be to delete all of the old content and then insert the new content.
I don’t know how practical the first choice in and the last two would significantly slow down the admin because ACF would have to do twice as much work. I’m also not really sure how this would effect revisions.
If really want that data to be removed then the best solution there is would be to create an acf/save_post filter that runs before ACF does the save. Then you could figure out how to compare the data and do the deleting.
I’ve never really had a problem with some old data lingering in the db.
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.