Skip to content

Content type creation discards added fields after switching tabs #35812

@hmoreras

Description

@hmoreras

Problem Statement

When creating a new content type in the admin UI, adding a field and then switching to a different tab causes the field to disappear when the user navigates back to the Fields tab. The field is also not persisted when the content type is saved.

This is specific to the create flow — editing an existing content type does not exhibit this behavior. Fields added while editing an existing content type persist across tab navigation and are saved as expected.

Impact: users lose work mid-edit while modeling new content types. The workaround is to save before changing tabs, which interrupts the modeling flow.

Steps to Reproduce

Video screencast:

video-issue.mov

Written steps:

  1. Go to Content Model → Add new Content Type (create flow)
  2. In the Fields tab, add a field (e.g., a Text field)
  3. Switch to a different tab (e.g., Permissions / Workflows / any other)
  4. Switch back to the Fields tab
  5. Observe: the field added in step 2 is gone
  6. Save the content type and reopen it — the field was never persisted

Expected: the field added in step 2 persists across tab navigation and is included when the content type is saved (same behavior as the edit flow).

Actual: the field disappears on return to the Fields tab and is not saved.

Acceptance Criteria

  • A field added to a new content type persists when the user navigates away from and back to the Fields tab
  • A field added before switching tabs is included in the payload when the content type is saved (round-trip from the API confirms persistence)
  • No regression in the existing-content-type edit flow (fields added there continue to persist across tabs and on save)
  • The behavior demonstrated in the reporter's video no longer reproduces
  • Regression test (unit or E2E) covers "add field → switch tab → switch back → field still present" on the create flow

dotCMS Version

Latest from main branch

Severity

Medium - Some functionality impacted

Links

NA

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions