AdvancedCustomFields / AdvancedCustomFields/acf

Components with two or more Clone fields will overwrite with the last field

Open
#37 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

When we create a component with two or more Clone type components, the data from the first components get overwritten with the data from the last component.

Example

For this example, we created a Content Box (1), which is a WYSIWYG, and a Write In component (2), which is essentially a text field with a text area:
(1)
image

(2)
image

Now, here is the component with two Clone fields:
image

Here is the Two Column Container component created in a new page with the two clone fields using the initially mentioned components:
image

And here is the same Two Column Container component after it is published/updated in the same page:
image

Note

This example uses only two Clone field components for simplicity, but the same happens if you have more than two Clone field components. There are other components in this project, but none of them share the same name as any of the components mentioned in the example section.

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

Reproduce the issue with a Two Column Container containing two or more Clone fields, then publish or update the page and compare the stored values with the displayed values. No source file or test is named, so trace Clone-field handling through the publish/update path and add coverage showing that each differently named Clone field retains its own data.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.