dotCMS / dotCMS/core

Bulk-content-removal safeguard counts archived contentlets, blocking legitimate container operations

Open
#37,377 1 comment 0 reactions 1 assignee View on GitHub

@danielsolis-dotcms is already working on this.

Since Sep 16, 2026.

dotCMS : Content Management OKR : Customer Support Team : Maintenance Type : Defect
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

The safeguard recently introduced to prevent unwanted removal of multiple contentlets at once counts contentlets in every state — including archived (deleted = true) ones — when evaluating whether an operation would remove "too many" contentlets from a container.

Because a contentlet's archived version can still have a stale row in multi_tree (e.g. left over from before archiving a contentlet was changed to automatically remove it from its container), the safeguard's count is inflated by content that is no longer actually "in use." This causes it to incorrectly block legitimate container/page operations that should be allowed, since the operation looks like it would remove more live content than it actually would.

Impact: low-frequency (requires a container to already hold a stale archived-contentlet reference), but when it hits, it fully blocks the affected operation with no workaround other than manually cleaning up the stale multi_tree row.

Steps to Reproduce

  1. Have a container with a multi_tree row referencing a contentlet identifier whose contentlet_version_info.deleted = true (archived) for the relevant language/variant — for example, a row that predates the fix that makes archiving a contentlet automatically remove it from its container.
  2. Perform an operation that triggers the bulk-removal safeguard (e.g. saving/reordering content in that container via the page editor / UVE, or the equivalent API call).
  3. Expected: the safeguard only counts non-archived (working/live) content toward its removal threshold, and the operation proceeds normally.
  4. Actual: the safeguard also counts the archived contentlet, inflating the removal count and incorrectly blocking the operation.

Acceptance Criteria

  • The bulk-removal safeguard's contentlet count only considers non-archived content (contentlet_version_info.deleted = false) for the relevant identifier/language/variant.
  • A container holding a stale archived-contentlet reference in multi_tree no longer trips the safeguard on an otherwise-valid operation.
  • The safeguard continues to correctly block bulk removal of non-archived content (no regression to its original intent).
  • Covered by a unit/integration test that seeds an archived contentlet reference in multi_tree and asserts the safeguard does not count it.

dotCMS Version

Reproducible on any version that includes the "auto-remove from container on archive" change plus the bulk-removal safeguard (both recently introduced). See linked Freshdesk ticket for the specific environment where this was reported.

Severity

Medium - Some functionality impacted

Links

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.