When I delete a node, the AfterUnPublish event does fire, but the isTrashed property of the document is always false regardless of whether it is being deleted or not. So the question is, how do I run code when a node in the site is deleted?
Turns out that when you delete a node in the CMS, the Document.AfterUnPublish event fires, followed by the Document.BeforeMoveToTrash and Document.AfterMoveToTrash. That solved my problem (at last!).
DataType Delete Event handlers
I'm having a similar problem with events not firing on delete.
I'm using the latest version: umbraco v 4.7.1.1 (Assembly version: 1.0.4393.24044)
None of these events are firing for me:
The following events are firing fine:
When I delete a node, the AfterUnPublish event does fire, but the isTrashed property of the document is always false regardless of whether it is being deleted or not. So the question is, how do I run code when a node in the site is deleted?
Thanks,
David
Hi all,
Turns out that when you delete a node in the CMS, the Document.AfterUnPublish event fires, followed by the Document.BeforeMoveToTrash and Document.AfterMoveToTrash. That solved my problem (at last!).
Cheers,
David
is working on a reply...