core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php index 2caddfe..68c2054 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php @@ -80,9 +80,15 @@ public function setValue($values, $notify = TRUE) { // Update any existing property objects. foreach ($this->properties as $name => $property) { $data_definition = $property->getDataDefinition(); + + // Some computed properties are computed only because they have custom + // storage (e.g. path aliases); setting a value on these is necessary. But + // read-only computed properties don't ever need writing to. + // @see path_entity_base_field_info() if ($data_definition->isReadOnly() && $data_definition->isComputed()) { continue; } + $value = isset($values[$name]) ? $values[$name] : NULL; $property->setValue($value, FALSE); // Remove the value from $this->values to ensure it does not contain any