diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 5e43723b4..30982bec2 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1975,10 +1975,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'); } /**