dotCMS / dotCMS/core

Audit follow-up: Edit content pristine timer can race slow async fields

Open
#36,015 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

dot-edit-content-form.component.ts reportedly uses #scheduleMarkPristineAfterInit with a blind 500ms timer. Slow async fields can load after the timer and mark the form dirty.

Report reference: dotcms-ui/src/app/portlets/dot-edit-content/dot-edit-content-form.component.ts:383-389

Potential impact

Users may get false unsaved-changes prompts on slow environments even when they only viewed content.

Suggested validation

Throttle async field loading or network responses and observe form pristine/dirty state after initial load.

Possible fix

Replace the fixed delay with explicit readiness coordination from async fields / form initialization state.

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

Inspect dotcms-ui/src/app/portlets/dot-edit-content/dot-edit-content-form.component.ts around lines 383-389, starting with #scheduleMarkPristineAfterInit and the async field initialization flow. Reproduce the issue by throttling async field loading or network responses, then verify that the form remains pristine after initial loading without relying on a fixed timer.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.