Skip to content

[6.x] Fix broken asset reference when discarding a duplicate upload#14947

Open
lazerg wants to merge 1 commit into
statamic:6.xfrom
lazerg:fix-asset-existing-file-reference
Open

[6.x] Fix broken asset reference when discarding a duplicate upload#14947
lazerg wants to merge 1 commit into
statamic:6.xfrom
lazerg:fix-asset-existing-file-reference

Conversation

@lazerg

@lazerg lazerg commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

When choosing "Discard and use existing file" for a duplicate upload, uploadSelected() built the asset id from this.container.handle, but the container meta only exposes id (which is the container's handle), so the id came out as undefined::filename and saving the entry failed with Asset [undefined::...] not found. This switches it to this.container.id, matching how the rest of the fieldtype references the container.

Fixes #14843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Asset field contents broken when choosing "Discard and use existing file"

1 participant