diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index a466b2a..f5197f9 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -251,13 +251,14 @@ public function toArray() { $id_key = $this->getEntityType()->getKey('id'); $config_mapping = $this->getEntityType()->getConfigMapping(); foreach (array_keys($definition['mapping']) as $name) { + // Check for a config mapping, otherwise use the default name. + $property_name = isset($config_mapping[$name]) ? $config_mapping[$name] : $name; // Special handling for IDs so that computed compound IDs work. // @see \Drupal\Core\Entity\EntityDisplayBase::id() - if ($name == $id_key) { + if ($property_name == $id_key) { $properties[$name] = $this->id(); } else { - $property_name = isset($config_mapping[$name]) ? $config_mapping[$name] : $name; $properties[$name] = $this->get($property_name); } } diff --git a/core/modules/node/src/Entity/NodeType.php b/core/modules/node/src/Entity/NodeType.php index f3cff98..fa1e18f 100644 --- a/core/modules/node/src/Entity/NodeType.php +++ b/core/modules/node/src/Entity/NodeType.php @@ -141,8 +141,8 @@ public function displaySubmitted() { /** * {@inheritdoc} */ - public function setDisplaySubmitted($display_submtited) { - $this->displaySubmitted = $display_submtited; + public function setDisplaySubmitted($display_submitted) { + $this->displaySubmitted = $display_submitted; } /**