diff --git a/src/elements/NestedElementManager.php b/src/elements/NestedElementManager.php index c3cc456861b..838e7e74fa6 100644 --- a/src/elements/NestedElementManager.php +++ b/src/elements/NestedElementManager.php @@ -858,7 +858,7 @@ private function saveNestedElements(ElementInterface $owner): void $this->propagationMethod !== PropagationMethod::All && ($owner->propagateAll || !empty($owner->newSiteIds)) ) || - ($owner->propagateRequired && $this->field->layoutElement->required) + ($owner->propagateRequired && $this->field?->layoutElement->required) ) { // Find the owner's site IDs that *aren't* supported by this site's nested elements $ownerSiteIds = array_map( @@ -925,7 +925,7 @@ private function saveNestedElements(ElementInterface $owner): void // its elements have been replaced by the other sites’ nested elements if ($owner->propagateAll) { $this->duplicateNestedElements($owner, $localizedOwner, force: true); - } elseif ($owner->propagateRequired && $this->field->layoutElement->required) { + } elseif ($owner->propagateRequired && $this->field?->layoutElement->required) { // if we're propagating required and the field is required, and it doesn't validate because of this field, // duplicate like above $localizedOwner->setScenario(Element::SCENARIO_LIVE);