diff --git a/src/Entity/Field/SetField.php b/src/Entity/Field/SetField.php index a6b84438..fdda6b44 100644 --- a/src/Entity/Field/SetField.php +++ b/src/Entity/Field/SetField.php @@ -83,7 +83,10 @@ class SetField extends Field implements FieldInterface, FieldParentInterface, Li { $fieldsFromDefinition = $this->getFieldsFromDefinition(); - return array_merge($fieldsFromDefinition, $this->getDefaultValue(), $this->getValue()); + // Values from the database, but not of fields that are no longer in the definition. + $value = array_intersect_key($this->getValue(), $fieldsFromDefinition); + + return array_merge($fieldsFromDefinition, $this->getDefaultValue(), $value); } private function getFieldsFromDefinition(): array