AdvancedCustomFields / AdvancedCustomFields/acf

Empty block creates a fatal error in admin

Open
#517 0 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

Hi
I have a weird issue.

I created blocks with acf (latest version both for WordPress and Acf).

One of the block is a relationship block.

When the block is placed in the content but no post is selected, and when the post is saved with this empty block, the admin will always send a fatal error.

After that the only fix I have is to switch to a default WordPress theme which doesn't include the block, to remove the empty block and then switch back to my theme.

Is it a bug or is it coming from my code?

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 failure in the WordPress admin with an ACF relationship block left empty, then compare saving it with the default WordPress theme. Confirm whether the fatal error occurs consistently and whether the empty block can be removed without switching themes; the issue does not name a file or test to inspect.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.