Flexible content has been great. I have latest version.
However, I went in to add a new field to a layout and it wouldn’t save.
To test, I moved the order of the fields, and the ones I moved vanished after save.
To test, I duplicated another flexible content item in field group, opened to verify it had the same fields as the original. Updated the field group, reopened the duplicate, no fields in layout.
To test, I created a new field group with a single flexible content item. To that, I added a single text field. Updated. Field is gone.
Only suggestion I found on forum was to increase PHP’s max_input_var .. so I did. That didn’t fix anything and since I’m not even nesting multiple items or have complex tests (single flexible content item with single field in single layout), that shouldn’t be an issue anyway.
To further show what I’m talking about, I recorded my screen and the video is here:
Is there a SQL query or PHP snippet I can use to try and show what structure the darn thing DOES have now? And perhaps why it isn’t working?
MAMP (so, local machine, not remote host at all).
So, I finally have a fix … sorta.
Do this at your own risk and please make sure you have a backup of your database, but on three occasions now for three different sites that have had ACF Repeaters break as I originally described above, this has worked:
1) Export the custom field set from Custom Fields > Tools
2) Delete the custom field set. NOTE: This DOES NOT delete the content that’s already been saved to individual pages or posts.
3) Import the custom field set again into Custom Field > Tools
Now, I did this once on a whim and it worked on my first broken site.
On my second broken site, this didn’t work the first time. So I repeated the process and it did work. I am not 100% sure why or of any differences I did, but now both sites are working fine with new repeaters and old repeaters accepting new data.
NOTE AGAIN: Make a backup of your database! 🙂
Yep, once I reimported, all my old content was still there and I was able to add new data to repeaters AND create new repeaters. Before doing this, basically repeaters just broke. I couldn’t add to pre-existing ones and I couldn’t create new ones (even super simple ones with a single field).
Also, and this is totally anecdotal, but both times my sites broke (two different sites) I’m 99% certain they broke after I had renamed a pre-existing repeater. I haven’t experimented to see if this is certain.
So I don’t know why it is breaking from a code perspective, just that I’ve stumbled across a fix for my particular situation.
I hope it works for you!
Remember, make a backup! 🙂
You must be logged in to reply to this topic.
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!
© 2023 Advanced Custom Fields.