Skip to content

Push publishing an archived Site deletes it on receiver instead of syncing its archived state #36034

@jcastro-dotcms

Description

@jcastro-dotcms

Reported via Support: https://helpdesk.dotcms.com/a/tickets/37709

Problem Statement

Push publishing a Site that is in archived state — either directly or as a push publishing dependency — causes that Site to be deleted on the receiver instance. This results in unintentional data loss: all content within the archived Site on the receiver is removed, even when the push publishing action is not Remove or Push Remove.

The receiver's Site status (archived/non-archived) must always reflect what comes in the bundle from the sender. Deletion of a Site on the receiver must only be triggered by an explicit Remove or Push Remove push action.

Impact: Any push publishing operation that includes an archived Site — even indirectly via a dependent Content Type — silently deletes that Site and all its content on the receiver.

Steps to Reproduce

Scenario 1 — Directly pushing an archived Site

  1. In the sender, create a test Site and push it to the receiver. Verify it exists on both ends.
  2. On both sender and receiver, manually stop and archive the Site.
  3. In the sender, push the archived Site again (non-Remove action).
  4. Result: The Site on the receiver is deleted.
  5. Expected: The Site on the receiver remains archived (or is updated to archived state).

Scenario 2 — Pushing an archived Site as a dependency

  1. In the sender, create a test Site and push it to the receiver. Verify it exists on both ends.
  2. Create a simple Content Type with a text field. Set its Site or Folder field to the test Site. Push it to the receiver.
  3. On both sender and receiver, manually stop and archive the Site.
  4. Update the Content Type (e.g., change its description) so push publishing detects a change.
  5. Push the updated Content Type (non-Remove action).
  6. Result: The Site on the receiver is deleted, along with all content in it.
  7. Expected: The Site on the receiver remains archived (or is updated to archived state). Only the Content Type metadata is updated.

Temporary Workaround

Unarchive all archived sites across all environments involved in Push Publishing. As soon as this is done, no Site will be inadvertently deleted, unless you explicitly want to when pushing the object for removal.

Acceptance Criteria

  • When push publishing an archived Site with any non-Remove / Push Remove action, the Site on the receiver is set to archived state — not deleted.
  • When an archived Site is included as a push publishing dependency (e.g., via a Content Type's Site/Folder field), the Site on the receiver is preserved and synced to archived state — not deleted.
  • Content within the archived Site on the receiver is not deleted during a non-Remove / Push Remove push.
  • Pushing with Remove or Push Remove action still deletes Sites on the receiver as expected (no regression).
  • If a Site is active on the sender but archived on the receiver, the receiver reflects the sender's active state after push.
  • If a Site is archived on the sender but active on the receiver, the receiver reflects the sender's archived state after push.

dotCMS Version

Latest from main branch

Severity

High - Major functionality broken

Links

NA

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions