dotCMS / dotCMS/core

Audit follow-up: Relationship and host-folder fields mark content dirty during async initial load

Open
#36,014 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Parent epic: #36004

Finding

The audit reports relationship and host-folder fields emit onChange / onTouched during async initial load without a load-state gate. Category and file fields reportedly already gate on LOADED.

Report references: dotcms-ui/src/app/portlets/dot-edit-content/components/fields/dot-relationship-field/dot-relationship-field.component.ts:199-202, dotcms-ui/src/app/portlets/dot-edit-content/components/fields/dot-relationship-field/dot-relationship-field.component.ts:377-384, host-folder-field.component.ts:67-100

Potential impact

Users may see a spurious unsaved-changes prompt after only viewing content.

Suggested validation

Open content with relationship and host-folder fields in a slow/async-load scenario and confirm whether the form becomes dirty without user edits.

Possible fix

Mirror the existing category/file field load gating so initial async value hydration does not emit user-change/touched events.

Caveat

This was AI-found by Claude from .scratch/audit/REPORT.md. Please perform secondary validation of correctness, severity, and value before actioning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the referenced relationship-field sections at dotcms-ui/src/app/portlets/dot-edit-content/components/fields/dot-relationship-field/dot-relationship-field.component.ts:199-202 and :377-384, plus host-folder-field.component.ts:67-100. Compare their load handling with the category and file fields, then reproduce a slow async initial load. Done means confirming whether the form becomes dirty without edits and validating the proposed gating change.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.