Home › Forums › Bug Reports › ACF 5.1.3 Duplicate Flexible content and Repeater Fields
Hi,
Noticed a bug. If you have a flexible content field with a repeater in it and duplicate the flexible content it duplicates all the fields that are in the repeater and keeps it in the first flexible content. So you end of with duplicates in the first and none in the second.
I noticed the same thing. If you have a flexible content field that has a repeater inside and you duplicate that flexible content field there is an issue with duplicating the fields inside the repeater. All looks well until you save the field group. Then you’ll notice that the everything duplicated beautifully…except the fields inside the repeater. If you look in the newly created flexible content field and open the repeater, you’ll find that there are no fields in it. If you open the repeater that is inside the original flexible content field, you’ll see 2 of each field.
Anyone found a work around for this?
Using v5.2.5 and having the same issue when using flex content inside flex content.
EDIT
A workaround, albeit a bit tedious, is to duplicate your ‘master’ field, then manually add any subfields to your sub flex field (make sense?!). That seems to save appropriately.
Here’s the layout for reference:
Flex Field 1
– Layout 1
— Sub Flex Field 1 (Column 1)
— Layout 1
— Layout 2
— Layout 3
— Sub Flex Field 2 (Column 2)
— Layout 1
— Layout 2
— Layout 3
— Sub Flex Field 3 (Column 3)
— Layout 1
— Layout 2
— Layout 3
– Layout 2
— Sub Flex Field 1 (Column 1)
— Layout 1
— Layout 2
— Layout 3
— Sub Flex Field 2 (Column 2)
— Layout 1
— Layout 2
— Layout 3
Still persistent in latest version, it seems that the logic of looping within a loop is mental.
Putting the_row_index();
in an alert within the second flex content shows how many times it’s looping through, as it’s echoing out 0, 1, 0, 1, 0, 2, 1, 3, 1, 4
etc
The topic ‘ACF 5.1.3 Duplicate Flexible content and Repeater Fields’ 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
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.