New Edit Content editor pre-fills empty Title with the derived (listed-field) value and persists it on save
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
What's happening
-
When a content type has an empty Title field plus a sibling field marked "Show on Listing" (the customer's "Size"), dotCMS derives a display title from that listed field — this is long-standing, expected behaviour and is what feeds listings, breadcrumbs, relationship labels and the API for ALL content.
-
The NEW Edit Content editor additionally binds the editable Title input to that derived value (it reads the computed contentlet "title" rather than the field's raw stored value). So the user sees "Size" sitting in the Title box even though they never typed it.
-
On Save/Publish the new editor submits that pre-filled value, so the Size value gets PHYSICALLY WRITTEN into the Title column. The old editor never did this (it showed Title empty and stored nothing).
In the new Edit Content editor, when a content type has an empty title field and a sibling field marked Show on Listing (e.g., a text field size), the Title input is auto-populated with the contentlet's derived title (the listed field's value). The user never types in Title, but on Save/Publish, the derived value is physically written into the title column — silently corrupting data.
The legacy editor does not do this: it binds the Title input to the field's raw stored value, so it shows empty and persists nothing. The derived title is expected for listings/breadcrumbs / relationship labels / API (computed via Contentlet.getTitle() / buildName()), but it must not leak into the editable input or be persisted.
Impact: any content type with an empty/optional title field plus a listed sibling field. Front-end (new Edit Content / Angular). Affects data integrity, not just display.
Steps to Reproduce
Steps to Reproduce
Reproduced on demo.dotcms.com (screenshots below):
- Create a content type with: a Text field "Title" (var
title, Show in List OFF) and a Text field "Size" (varsize, Show in List ON). - Enable Edit Content Beta (new editor) on the content type.
- Add new content: leave Title empty, set Size = "Large". Save/Publish.
- Reopen the contentlet in the new editor → Title shows "Large" (the Size value), though it was never entered.
- Confirm persistence: open the same contentlet in the legacy editor (banner "revert" link) → the Title field now contains "Large" → the derived value was written to the stored title column.
- (Relationship manifestation) Relate this contentlet as a child of another content type → it appears in the relationship widget under the Title column as "Large".
Expected: Title stays empty; nothing is persisted to the title column unless the user types it.
Actual: The title is pre-filled with the listed field's value and persists on save.
Likely cause/pointers
- New editor reads
contentlet[field.variable]for the title field — i.e., the server-computedtitle— intextFieldResolutionFn(dot-edit-content-form-resolutions.ts:60–79, line 70; mapping line 315). - Form control initialized from it:
dot-edit-content-form.component.tsgetInitialFieldValue()/createFormControl(). - Save submits the full form value with no title guard:
fireWorkflowAction()/processFormValue(). - Computed title source (expected):
Contentlet.getTitle()/buildName();ESContentFactoryImpl~L516–528.
Acceptance Criteria
- In the new editor, an empty title field binds to the field's raw stored value (empty), not the computed contentlet
title— matching legacy behavior. - Saving content where the user did not enter a title does not persist the derived value into the
titlecolumn. - Display-title derivation for listings, breadcrumbs, relationship labels, and API is unchanged.
- Regression test covering: empty title field + listed sibling text field, new editor, save → title column stays empty.
dotCMS Version
Reported on 26.06.04-01; reproduced on demo.dotcms.com (new Edit Content editor). Front-end.
Severity
Medium - Some functionality impacted
Links
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form-resolutions.ts, especially textFieldResolutionFn, then trace getInitialFieldValue(), createFormControl(), fireWorkflowAction(), and processFormValue() in dot-edit-content-form.component.ts. Compare these with Contentlet.getTitle()/buildName() and ESContentFactoryImpl; done means the empty raw title remains empty on save while derived display titles remain unchanged, with regression coverage for the listed-sibling case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, java
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100