craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.2k stars 617 forks source link

[5.x]: "Delete (with descendants)" element action doesn't delete descendants #15273

Closed mmikkel closed 17 hours ago

mmikkel commented 2 days ago

What happened?

Description

The "Delete (with descendents)" element action doesn't actually delete descendants; only selected elements are deleted:

https://github.com/craftcms/cms/assets/298510/2cc21b1d-c1d4-4108-8602-7f21b7541885

Unable to reproduce on Craft 4.10.

Steps to reproduce

  1. Have a multi-level structure and open its index view
  2. Select an entry with children. Don't select any of its child entries.
  3. Click the element action disclosure menu, and select "Delete (with descendants)".
  4. Confirm that only the selected (parent) entry has been deleted, and none of its descendents

Expected behavior

Descendents being deleted.

Actual behavior

Only selected elements are deleted.

Craft CMS version

5.2.4.1

PHP version

8.2.20

Operating system and version

DDEV v1.23.2

Database type and version

MySQL 8.0.36

Image driver and version

No response

Installed plugins and versions

None

i-just commented 1 day ago

Hi, thanks for reporting! I raised a PR for this.

brandonkelly commented 17 hours ago

Craft 5.2.5 is out with that fix. Thanks again!