From 1c82636928cf84ced9e424f201a714045354fbda Mon Sep 17 00:00:00 2001 From: "Marco (Valandur)" Date: Wed, 24 Oct 2018 12:18:08 +0200 Subject: [PATCH] fix(archived): Fix for archived PageSections --- src/PageSectionsExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PageSectionsExtension.php b/src/PageSectionsExtension.php index 95ab2f1..acfea82 100755 --- a/src/PageSectionsExtension.php +++ b/src/PageSectionsExtension.php @@ -91,7 +91,7 @@ public function onAfterWrite() { parent::onAfterWrite(); - if ($this->owner->ID && !$this->owner->__rewrite) { + if ($this->owner->ID && !$this->owner->__archived) { $sections = $this->getPageSectionNames(); foreach ($sections as $sectionName) { @@ -109,6 +109,7 @@ public function onBeforeArchive() { $sections = $this->getPageSectionNames(); + $this->owner->__archived = true; foreach ($sections as $sectionName) { $name = "PageSection".$sectionName; $this->owner->{$name . "ID"} = 0;