Home › Forums › Bug Reports › Clone Field Bugs
There are 2 bugs I’m encountering with clone field type. Here is a run down of my setup:
So a hierarchy of my blocks-to-components look something like this:
…totaling 5 field groups, 3 for reusability:
Bug 1
When more than one field group shares the same name, the second field group’s name is not displayed in the clone field dropdown list of options. For example, when I add a clone field to other blocks to clone and use Content (#3), I see the field group name for #2 in the list, not #3. Though I do see the fields for #3 in the list.
Bug 2
When the same field group is present more than once as a clone field, despite using prefixed labels and field names, there does not seem to be any isolation with the conditional displays. They seem to be affected by the first instance instead. For example, using my setup example above, the conditional display for Footer Content and Footer Code is affected when Header Content Type is changed instead of Footer Content Type.
You should submit the bugs here https://www.advancedcustomfields.com/contact/
The only suggestion I can make for bug 1 is to use unique names for your field groups.
As far as bug 2 goes, if you are including the same field group multiple times in the same clone field then this is not a but. The fields will get the same prefixes and end up having the same field names and keys. You would need to use different clone fields to include clone the same group multiple times.
Hi John! Thanks for your response. For bug 2, there are actually 2 separate clone fields that clone the same field group. In my example, Header (component field group) and Footer (component field group) are 2 separate clone fields. I enabled prefix for both of them and that was where I saw the bug. Enabling prefix on the labels and field names gave me this setup:
header_content_type
header_content
header_code
footer_content_type
footer_content
footer_code
The base field group for the component has these fields without the prefixes:
content_type
content
code
Thank you for your response! I posted a reply to you for bug #2, but I’m not seeing it anymore. I will submit via the link you provided.
Your post got marked as spam for some reason, should be set.
In that case it may have something to do with the group names as in bug #1.
to be honest, I don’t know what could be the cause because the clone field should be looking that the group key and not the group name.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.