Support

Account

Home Forums Backend Issues (wp-admin) Problem with clone fields suddenly "expanding"

Solving

Problem with clone fields suddenly "expanding"

  • I’m making extensive use of clone fields in my latest project. I’m also using the acf-json folder to synchronise the field groups from development environment to staging & production servers.

    For some reason, I’m getting situations where the cloned field-groups suddenly “expand” within the containing field group.

    For example, I have a field group called “button component” which is used in a field group called “text block”. Normally when editing the “text block” field group, I should see a single clone field called “button component”. However, something is happening at some point which is messing things up so that now when editing the “text block” field group, I am seeing ALL the fields from the “button component” within “text block”.

    Has anyone got any idea what could be causing this?

    Could it be because I am pushing the use of ACF’s clone fields beyond what they can handle?

    In this site I am using clone fields to the extreme, for example, having “component” field groups cloned into “block” field groups which are cloned into “section” field groups which are cloned into a flexible content field.

    When the problem occurs, I have been able to fix it by deleting ALL the field groups and then re-syncing them again from the .json files, but this seems to be unreliable. Sometimes it works, sometimes it doesn’t.

  • This might have something to do with the syncing process. After a bit of testing I suspect that if you sync the “component” fields before the “containing” fields, then that causes the problem. If I sync the “containing” fields first, then they seem to work with the clone field in place as intended

  • I just encountered this very issue as well… We have a page builder (Flexible Content) where each layout loads in a cloned component. A sync was performed (with all syncable fields checked), at which point it seems the page builder was “expanded” into its component fields…

    BUT…

    Not all of the fields were correct 🙁 At least one of the components was missing a field (and that field also wasn’t showing on the front-end). This is how we discovered there was an issue.

    I noticed the mod date on the JSON of the page builder was way different from what it should have been and I assumed that someone had messed with it in the admin. I pulled a backup from the day before and that JSON file looked correct. I was able to update the timestamp on my local version of the JSON and pushed to the site, performed a sync, and the missing field(s) was restored.

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

The topic ‘Problem with clone fields suddenly "expanding"’ is closed to new replies.