Skip to content

Add Image Content tab crashes because the image field is rendered as a TextField #163

Description

@aryan7081

Describe the bug
Creating an Image and opening the Content tab on the add form shows the Aurora error page instead of the metadata/image fields.

To Reproduce
Steps to reproduce the behavior:

  1. Log in to Aurora in development mode.
  2. Open the Add menu and choose Image.
  3. On the add form, click the Content tab.
  4. See the error page.

Expected behavior
The Content tab should show the Image type fields, including a working image/file widget, without crashing.

Screenshots

Screen.Recording.2026-08-14.at.8.47.14.PM.mov

Software:

  • OS: macOS
  • Browser: Chrome
  • Plone Aurora Version: main
  • Plone Version: 6.2.1
  • Plone REST API Version: 10.0.2

Additional context
The Image type schema exposes the blob field as widget: "file" and factory: "Image". Widget lookup in packages/cmsui/components/Form/Field.tsx treats an unknown widget string as the default TextField and never falls through to the factory. ImageWidget is only registered as widget: "image" in packages/cmsui/config/widgets.ts, and there is no File widget. The Content tab then passes value={field.state.value} (null or a file object) into React Aria TextField, which expects a string and throws.

Related: flattenScales in packages/layout/components/Image/Image.tsx also assumes image.scales exists, which can crash the Image view after save if scales are missing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions