Skip to content

[4.x]: Delete For Site behavior for multi-site entries is inconsistent (hard-/soft-deletion) #13645

@michaelrog

Description

@michaelrog

What happened?

The Delete For Site behavior appears to be inconsistent with respect to soft-/hard-deletion:

  • If I delete an entry that is only enabled in one site, the entry is soft-deleted and appears in Trashed.
  • If I delete a multi-site-enabled entry that is currently only active on one site, the entry is soft-deleted and appears in Trashed.
  • If I delete a multi-site-enabled entry that is currently active on multiple sites, the entry (for that site) is hard-deleted and cannot be restored.

This behavior is confusing; It feels like a bug.

As a content editor, I would expect that, if soft-deletes are enabled for entries, an entry I delete from a site should be recoverable from Trashed, no matter how many sites it's active in at the time of deletion.

Steps to reproduce

  1. Accidentally Delete-For-Site an entry that is only enabled in one site. See that you can restore the entry from Trashed.
  2. Accidentally Delete-For-Site an entry that is enabled in multiple sites. See that it's irrecoverably gone. Cry. 😢

Craft CMS 4.5.3
PHP 8.1.20
MySQL 8.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions