diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index cdef30896..8a8bbd786 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1951,10 +1951,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid } function doDeleteFromLive() { + $this->extend('onBeforeUnpublish'); + $origStage = Versioned::current_stage(); Versioned::reading_stage('Live'); $this->delete(); - Versioned::reading_stage($origStage); + Versioned::reading_stage($origStage); + + $this->extend('onAfterUnpublish'); } /**