Home › Forums › Bug Reports › ACF Clone field in group not importing properly › Reply To: ACF Clone field in group not importing properly
Just to follow up on this. After doing some further testing, I was getting a bit closer by changing the display type from “Seamless” to “Group” before I did the export / import.
When I imported my Page Blocks field group, the field keys were preserved, however, the clone field value was “Unknown field”.
I then took a look at the field group for the source fields (Sitewide Defaults), and they were gone! Importing deleted the fields which were being cloned.
Next, I imported these cloned fields again (Sitewide Defaults). The keys match.
Checking back in my Page Blocks field group and ACF has picked up the cloned fields correctly. “Unknown field” has been replaced by “colour”, the name of the cloned field.
So, I went for broke and I switched this to Seamless. Instantly it broke the clone relationship again. It converted it to a Select field with the same values.
I’ve turned on the display of field labels and noticed something interesting.
In Page Blocks, my “section_colour” clone field key is “field_5ec2c2ae8fc5e”
In Sitewide Defaults, my “colour” field key is “field_605b6e3946788”
When the bug occurs and the clone field becomes ‘flattened’ as a regular field, the key merges. It becomes “field_5ec2c2ae8fc5e_field_605b6e3946788”.
All of this happens when the clone field is inside a flex or repeater. Works fine if it’s outside the repeater.
The biggest concern here is that it either duplicates/triplicates fields and deletes the source field. Very strange.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.