AdvancedCustomFields / AdvancedCustomFields/acf
Block fields unresponsive in converted reusable block
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Problem
ACF block fields are not consistently initialized after converting a Reusable Block to a Regular Block. This issue does not always occur.
Since core block still seem to work, my guess was it is an ACF issue.
Example
Steps to reproduce
- Insert a reusable block which includes ACF Block fields (Reusable block outline below)
- Convert the reusable block to a Regular Block
Reusable Block JSON
{
"__file": "wp_block",
"title": "Person Listing",
"content": "<!-- wp:group {\"backgroundColor\":\"blue-light\",\"textColor\":\"gray-dark\"} -->\n<div class=\"wp-block-group has-blue-light-background-color has-gray-dark-color has-text-color has-background\"><div class=\"wp-block-group__inner-container\"><!-- wp:heading -->\n<h2>Meet the faces of EDI</h2>\n<!-- /wp:heading -->\n\n<!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:acf/person {\n \"id\": \"block_5ebc6bf81299d\",\n \"name\": \"acf\\/person\",\n \"data\": {\n \"person\": 899,\n \"_person\": \"field_5ebc0df79263f\"\n },\n \"align\": \"center\",\n \"mode\": \"edit\"\n} /--></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:acf/person {\n \"id\": \"block_5ebc6bf81299e\",\n \"name\": \"acf\\/person\",\n \"data\": {\n \"person\": 849,\n \"_person\": \"field_5ebc0df79263f\"\n },\n \"align\": \"center\",\n \"mode\": \"edit\"\n} /-->\n\n<!-- wp:paragraph -->\n<p></p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div></div>\n<!-- /wp:group -->"
}
Block Outline
Person being the ACF Block
Similar Issue
#183
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 by reproducing the conversion using the supplied Reusable Block JSON and the ACF Person block outline. Compare field initialization before and after converting the reusable block to a regular block; done means the ACF fields consistently respond after conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100