EasyCorp / EasyCorp/EasyAdminBundle

FileField & ImageField: empty link on detail page

Open
#7,631 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4.3k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
11

Description

Describe the bug
When using an optional FileField or an ImageField in a crud, on the detail page, if no file/image was uploaded, an empty clickable link is generated returning a 404.
And for the image, an empty image is trying to be rendered:

Image

To Reproduce

  1. Create a crud with a nullable FileField or ImageField.
  2. Save entity without file/image.
  3. Open the detail page
  4. You should see a clickable link to 404 error page

Contributor guide

Open the contributing guide

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 with nullable FileField and ImageField values in an EasyAdmin CRUD, then inspect how those fields are rendered on the detail page. Confirm that empty values produce neither a clickable 404 link nor an empty image, while uploaded files and images continue to render normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.