fix(push-publishing): archived Site no longer deleted on receiver (#36034)#36174
fix(push-publishing): archived Site no longer deleted on receiver (#36034)#36174dsilvam wants to merge 1 commit into
Conversation
…6034) When pushing an archived Site with a non-Remove operation, the receiver was unconditionally calling HostAPI.delete() after archive(), ignoring the isPushedContentArchived flag. Added a guard so delete() is only called for explicit Remove/Push Remove operations, matching the existing pattern used for regular content in the same method. Refs: #36034 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ Codex Review failed —
|
|
Claude finished @dsilvam's task in 5m 30s —— View job dotCMS Backend Review
Review posted as a separate comment. Summary:
No Critical or High findings — PR is clear to merge after optional cleanup. |
🔍 dotCMS Backend Review[🟡 Medium]
} finally {
tempDir.delete(); // ← silently fails when bundler output files remain inside💡 Replace with Next steps
|
Proposed Changes
HostAPI.delete()inContentHandler.archiveOrDeleteContent()behind!isPushedContentArchivedso that pushing an archived Site with a non-Remove operation archives it on the receiver instead of deleting it.HostBundlerHandlerTestcovering both the fixed path (PUBLISH + archived → site preserved) and the regression path (UNPUBLISH + archived → site deleted).Root Cause
In
ContentHandler.archiveOrDeleteContent(), the Host/Site branch (lines 1277–1282) ignored theisPushedContentArchivedparameter and unconditionally calledarchive()thendelete(). The regular-contentelsebranch already guardeddestroy()behind!isPushedContentArchivedcorrectly — the Host branch simply lacked the same guard.Checklist
Additional Info
Fixes #36034. When a Site is archived on the sender and pushed with any non-Remove / Push Remove action, the receiver now sets the Site to archived state instead of deleting it and all its content. The explicit Remove/Push Remove path is unaffected.
Screenshots
N/A — backend-only change