Skip to content

fix(edit-content): resolve the Binary field variable for the image editor (#36426)#36427

Closed
oidacra wants to merge 1 commit into
mainfrom
issue-36426-binary-image-editor-field-variable
Closed

fix(edit-content): resolve the Binary field variable for the image editor (#36426)#36427
oidacra wants to merge 1 commit into
mainfrom
issue-36426-binary-image-editor-field-variable

Conversation

@oidacra

@oidacra oidacra commented Jul 3, 2026

Copy link
Copy Markdown
Member

Proposed Changes

  • Fix DotFileFieldComponent.onEditImage() resolving the wrong field variable for Binary fields hydrated from a saved contentlet: it used the parent contentlet's titleImage, which can point at an Image reference field with no binary, so the editor preview requested /contentAsset/image/{parentInode}/{titleImage}/... and got a 404 ("We couldn't render the preview"). Saving from that state staged a temp file with unusable metadata and the field preview degraded to the type icon.
  • The store already injects the correct fieldVariable when hydrating from the parent (setFileFromContentlet); prefer it, falling back to titleImage only for standalone assets (dotAsset via getAssetData, AI-generated images), which carry no injected variable and do keep their image in their own titleImage field.
  • Add a spec covering the parent-hydrated Binary case (launcher must open with the injected field variable, not the parent's titleImage).

Pre-existing on main (editor wiring from #36172 / #36350); surfaced while QA-testing #36295. Verified live: Binary editor preview renders and the save round-trip applies the edit; Image/File fields are unaffected. Related: #36406 reworks the Image/File editor flow but leaves Binary behavior unchanged, so both changes are independent.

This PR fixes: #36426

…itor

Opening the image editor from a Binary field hydrated from a saved
contentlet built the editor URLs with the parent contentlet's titleImage,
which can point at an Image reference field that holds no binary. The
editor preview then 404s and a save from that state stages a temp file
with unusable metadata, degrading the field preview to the type icon.

Prefer the field variable the store injects when hydrating from the
parent contentlet (setFileFromContentlet); standalone assets (dotAsset
via getAssetData, AI-generated images) carry no injected fieldVariable
and keep resolving through their own titleImage.

Refs: #36426
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @oidacra's task in 20s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🤖 dotBot Review (Bedrock)

Reviewed 2 file(s); 0 candidate(s) → 0 confirmed, 0 uncertain (unverified, kept for review).

✅ No issues found after verification.


us.deepseek.r1-v1:0 · Run: #28681746629 · tokens: in: 4063 · out: 1141 · total: 5204 · calls: 2 · est. ~$0.012

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

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Binary field image editor resolves the wrong field variable (parent titleImage) and 404s

1 participant