diff --git a/core/lib/Drupal/Core/Config/Schema/Mapping.php b/core/lib/Drupal/Core/Config/Schema/Mapping.php index a250821..a8d6c53 100644 --- a/core/lib/Drupal/Core/Config/Schema/Mapping.php +++ b/core/lib/Drupal/Core/Config/Schema/Mapping.php @@ -131,6 +131,11 @@ public function getPropertyDefinitions() { $this->propertyDefinitions = array(); foreach ($this->getAllKeys() as $key) { $definition = isset($this->definition['mapping'][$key]) ? $this->definition['mapping'][$key] : array(); + if (empty($definition)) { + debug($this->definition['type']); + debug($this->definition['debug']); + throw new \InvalidArgumentException(String::format("The configuration property @key.@element doesn't have schema.", array('@key' => $this->getFullName(), '@element' => $key))); + } $this->propertyDefinitions[$key] = $this->buildDataDefinition($definition, $this->value[$key], $key); } } diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index f8036ea..1943307 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -91,7 +91,9 @@ public function buildDataDefinition(array $definition, $value, $name = NULL, $pa if (isset($name)) { $replace['%key'] = $name; } + $definition['debug']['dynamic_type'] = $type; $type = $this->replaceName($type, $replace); + $definition['debug']['resolved_type'] = $type; // Remove the type from the definition so that it is replaced with the // concrete type from schema definitions. unset($definition['type']); @@ -135,6 +137,7 @@ public function getDefinition($base_plugin_id, $exception_on_invalid = TRUE) { unset($definition['type']); $this->definitions[$type] = $definition; } + $definition['debug']['generic_type'] = $base_plugin_id; // Add type and default definition class. return $definition + array( 'definition_class' => '\Drupal\Core\TypedData\DataDefinition',