Shouldn't deleting an item count as unpublishing it first?

Topics: Core, Customizing Orchard, General
Nov 24, 2015 at 9:39 PM
When creating a content item and publishing it, it fires both the Creating/Created pair of events as well as Publishing/Published pair of events.

When deleting (removing) a content item (even if it is already published), it only fires the Removing/Removed pair of events.

For symmetry, I believe it makes sense when deleting an item to check the published state and also fire Unpublishing/Unpublished immediately before.

Right now when I have work that I want done when a published item is no longer published (whether it was "unpublished" or "deleted"), then i'm having to put it in an unpublished handler AND duplicate the code in a removing handler, checking whether the item is currently published.

I also think this would help with issues such as https://github.com/OrchardCMS/Orchard/issues/4935 where all that needs to be done is modify the alias table on unpublished.