AdvancedCustomFields / AdvancedCustomFields/acf

Block fields unresponsive in converted reusable block

Open
#308 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

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
  1. Insert a reusable block which includes ACF Block fields (Reusable block outline below)
  2. 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

Screenshot 2020-05-29 15 11 10
Similar Issue

#183

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.