Hello! I inherited a mess of a site, and they have been using ACF for some time now. First of all, when I went to look at the field groups, there are tons of duplicates, and a bunch of empty ones as well. I’m not really sure how to clean it out, since I don’t know which duplicates are the real ones and which are not active.
I’ve also got an issue on one page where there’s extra fields on the page, that I cannot find anywhere in the Field groups. I am also not getting an “edit field group” prompt when I hover next to the accordion close arrow. These fields match some other ones I am trying to add content to, and it looks like since there’s more than one field with the same name, I am unable to add the content to the page. When I save the page the content all disappears.
I’ve attached an image of what the offending page looks like, and what the field group duplicates look like. I’m just not even sure where to start in on this mess. Never seen anything like it.
The first thing that you need to do is to figure out why you can’t edit these extra field group. These field groups are either located in code or they are located in the theme in the acf-json folder. You need to search your site code for calls to acf_add_local_field_group to see what’s in the code. If you have a folder in your theme “acf-json” you can try renaming that and see if that clears anything up.
Beyond this, if it were me I’d start looking at field groups and their location rules and start making them as inactive to see if I could get rid of them that way.
Hovering over the field groups should give you the post ID of the field group, for example ..../wp-admin/post.php?post=989&action=edit in this case the post ID is 989. Groups that were added later will have higher post ID values. I’d try deactivating the newer copies first.
Basically you have a lot of work ahead of you and most of it will be guessing, trial and error, until you can eliminate what you don’t need.
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Phantom fields and unable to save’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users