AdvancedCustomFields / AdvancedCustomFields/acf

Can't delete or edit images when using flexible content in a block

Open
#94 5 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

Issue Overview

I've created a gutenberg block using the following method:
https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/

The block includes a flexible content field with 2 layout options, one including an image.

image-1

Once you populate the content and either switch from edit to preview, or reload the page; the image can't be edited or removed. The buttons cease to function. There are no errors in the console.

The only way to edit the image is to delete the block and repopulate the content.

Steps to Reproduce

  1. Create block with a flexible content field
  2. Add an image to one of the layouts
  3. Add a block using that layout and add the image
  4. Either switch views(edit, preview) or reload the page
  5. Observe that the edit and delete buttons no longer function

Broken image button:
broken-btn

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 issue with an ACF Gutenberg block containing a flexible content field and an image layout, following the linked ACF Blocks guide. Switch between edit and preview or reload the page, then inspect the image controls; done means the edit and delete buttons continue to function without console errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.