Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeater Field Bug - Templates with multiple BD Repeater fields fail if the ACF repeaters are inside ACF groups #1164

Open
DigitalServicesLab opened this issue Oct 24, 2024 · 1 comment

Comments

@DigitalServicesLab
Copy link

In BD 2.1 (possibly before as well) you cannot have more than one BD repeater field in a post template, if the ACF repeater fields are inside ACF Group fields.
If you do, only the first repeater field on the template will output data - on the front end - they work fine when editing in BD.

Steps to reproduce this issue

  1. Using ACF create a Custom Post Type
  2. Using ACF create a Field Group for this custom post type
  3. In the Field Group add a Group field
  4. In the Group field add a Repeater field with a single Text field inside it
  5. Add a second Group field and add another repeater field also with a single text field inside that
  6. You should now have a Field Group containing two Group fields, each with a Repeater field with a single text field inside as per fig 1
  7. Add a new post of the custom post type and populate both repeater fields with some data
  8. Create a simple BD global block for the first repeater field
  9. Create a simple BD global block for the second repeater field
  10. Create a BD template for the single CPT view
  11. Add a BD repeater field for each ACF repeater field (two repeater fields), using the new global blocks as appropriate.
fig 1
Field Group
--Group field
----Repeater field
------Text field
--Group field
----Repeater field
------Text field

When you view the new single cpt on the front end - not logged in - only the repeater field that comes first in the template outputs anything. The other field is there in the DOM but has no content.
When editing the BD template though, it appears to be working fine.

This issue does not occur if the repeater fields are not inside group fields.

@brandforwardnl
Copy link

I can confirm this. I was breaking my head over this issue for an hour or 2:

I had a normal acf repeater in the top section of the template and an acr group with repeater somewhat lower on the template. The group repeaters didn’t show. When I delete the normal repeater, the acf group repeaters work. Very strange bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants