
Hi:
I discovered a problem with Flexible Content Fields nested in Repeater fields: if you delete the repeater row without first deleting the flexible content row, the data and fields from the flexible content fields remain in the database.
To replicate:
Use the attached json file, or create a Repeater field, and add a flexible content field with a least one layout, and add it to a post type.
Add a new post, and a row in your repeater field, then add a row in your flexible content field. Add data to that layout’s field, and save. You’ll see entries in the db like this: http://j.mp/1SSHbNj.
Now, delete the repeater row without deleting the flexible content row. Check your db again: http://j.mp/1SSHLed. Now the repeater row is gone, but the flexible content field data remains.
This is a undesirable because:
- It leaves a lot of probably unused fields in the database unnecessarily, and
- If a user adds a new flexible content row, then it will pick up the values left in the database from the old repeater row’s flexible content field.
Thank you!
Jen G
@germanny
Hi Jen,
Thanks for the report.
Could you please open a new ticket from the following link so it can be passed to the plugin author directly? Here’s the link: https://support.advancedcustomfields.com/new-ticket.
Thanks 🙂