AdvancedCustomFields / AdvancedCustomFields/acf

Cloning all fields from field group that has repeater. Won't save repeater values.

Open
#13 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

I seem to have found an issue with the Clone field.

Steps to recreate:
1 - Create a Field Group named Layouts, for sake of reference.
2 - Then create a Repeater in that Layouts group.
3 - Populate that Repeater with some dummy fields. ( image, text, etc. )
4 - Create a new Field Group, named Home Page, for sake of reference and assign it to Home template.
5 - In the Home Page field group, create a Clone field and set it to "All fields from Layouts field group".
6 - Go to Home template, upload repeater subfields with content then update the page. The fields reset to blank.

Way I got it to work for now: On step 5, set Clone field to clone just the "Layouts (repeater)". Now it will save subfields just fine.

Side note: ACF is the greatest thing to ever happen to WordPress. Fantastic work!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the six steps in a WordPress installation with the Layouts and Home Page field groups. Compare Clone set to all fields with Clone set only to the Layouts repeater, then trace the Clone field handling during save; done means repeater subfield values persist after updating the Home template.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.