AdvancedCustomFields / AdvancedCustomFields/acf

Image field doesn't reset itself when attachment is deleted from media library

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

When image selected via image field is deleted from media library this field appears to be empty but keeps the original value even after post update.

Expected bahavior:
Preferably display some kind of error message and allow user to remove the non-existent image. Alternatively display empty field but delete the original value when post is updated.

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

Reproduce the issue by selecting an image in an image field, deleting it from the media library, and updating the post. Trace the image field and post-update handling to see why the deleted attachment value remains. Done means the field reports or clears the missing image and the post no longer retains its original value after update.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.