AdvancedCustomFields / AdvancedCustomFields/acf
Repeater block in Gutenberg Block not copying correctly
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Found this odd bug when using a Gutenberg block with ACF repeater fields in a Gutenberg Pattern.
This bug has something to do with copying a Gutenberg block with a repeater field onto the same page. If you copy a Gutenberg block with an ACF repeater field and paste it onto the same page then try and change the contents of the repeater fields. It looks like it's changing on the admin editor side, but the front end doesn't change and if you refresh the page all your changes are lost.
This typically wouldn't be an issue but when this repeater field block is in a Gutenberg Pattern it also causes the same issue.
Steps to replicate:
- Create an ACF block with a repeater field
- Add ACF repeater block to the page and save
- Add demo content to ACF repeater block
- Click more settings on the ACF repeater block and Copy block
- Paste this copied block onto the page
- Change the contents of this copied block, it will look like you are changing contents in the admin
- Click save and view the front end
- All your changes to the copied block are lost
Workaround:
After copying a Gutenberg block or a Gutenberg Pattern that includes an ACF repeater to a page you need to save the page and then refresh the page BEFORE changing anything in the repeater fields.
Any ideas what could be causing this or how can I fix this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed reproduction steps in a WordPress Gutenberg editor using an ACF repeater block, then inspect the copied block's save and front-end behavior. Done means a copied repeater block can be edited, saved, refreshed, and display the changed values without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100