From 8d4937d07112d8a7990bfa12e1c1abacf3e9ea63 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Fri, 12 Oct 2018 17:33:15 +0200 Subject: [PATCH] FIX Do not write during an elemental owners getCMSFields operation --- src/Extensions/ElementalAreasExtension.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Extensions/ElementalAreasExtension.php b/src/Extensions/ElementalAreasExtension.php index 50415c08..c86b4a57 100644 --- a/src/Extensions/ElementalAreasExtension.php +++ b/src/Extensions/ElementalAreasExtension.php @@ -164,14 +164,6 @@ public function updateCMSFields(FieldList $fields) $area = $this->owner->$eaRelationship(); - // if area isn't in the database then force a write so the blocks have a parent ID. - if (!$area->isInDb()) { - $area->write(); - - $this->owner->{$key} = $area->ID; - $this->owner->write(); - } - $editor = ElementalEditor::create($eaRelationship, $area); $editor->setTypes($this->getElementalTypes());