diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 58f0ec126..dd7d47f5d 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -496,11 +496,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid * @return SiteTree The duplicated object. */ public function duplicate($doWrite = true) { + + $this->extend('onBeforeDuplicate', $page); $page = parent::duplicate(false); $page->Sort = 0; if($doWrite) { $page->write(); } + $this->extend('onAfterDuplicate', $page); return $page; }