diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php index 0836eaf..536a4cb 100644 --- a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +++ b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php @@ -80,6 +80,11 @@ protected function checkValue($key, $value) { $error_key = $this->configName . ':' . $key; $element = $this->schema->get($key); if ($element instanceof Undefined) { + // @todo Temporary workaround for https://www.drupal.org/node/2224761. + $key_parts = explode('.', $key); + if (array_pop($key_parts) == 'translation_sync' && strpos($this->configName, 'field.') === 0) { + return array(); + } return array($error_key => 'Missing schema.'); } diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php index 83100f3..07c9567 100644 --- a/core/modules/config/src/Tests/ConfigImportAllTest.php +++ b/core/modules/config/src/Tests/ConfigImportAllTest.php @@ -15,6 +15,8 @@ */ class ConfigImportAllTest extends ModuleTestBase { + use SchemaCheckTestTrait; + /** * The profile to install as a basis for testing. * @@ -123,5 +125,17 @@ public function testInstallUninstall() { $this->container->get('config.manager') ); $this->assertIdentical($storage_comparer->createChangelist()->getChangelist(), $storage_comparer->getEmptyChangelist()); + + // Now we have all configuration imported, test all of them for schema + // conformance. Ensures all imported default configuration is valid when + // all modules are enabled. + $names = $this->container->get('config.storage')->listAll(); + $factory = $this->container->get('config.factory'); + /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */ + $typed_config = $this->container->get('config.typed'); + foreach ($names as $name) { + $config = $factory->get($name); + $this->assertConfigSchema($typed_config, $name, $config->get()); + } } } diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php index 6af6741..a56448a 100644 --- a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php +++ b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php @@ -32,8 +32,8 @@ class FileItem extends EntityReferenceItem { public static function defaultSettings() { return array( 'target_type' => 'file', - 'display_field' => 0, - 'display_default' => 0, + 'display_field' => FALSE, + 'display_default' => FALSE, 'uri_scheme' => file_default_scheme(), ) + parent::defaultSettings(); } diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml index 2985696..2d139a3 100644 --- a/core/modules/image/config/schema/image.schema.yml +++ b/core/modules/image/config/schema/image.schema.yml @@ -82,6 +82,18 @@ field.image.settings: default_image: type: field_default_image label: 'Default value' + target_type: + type: string + label: 'Target type' + display_field: + type: boolean + label: 'Display field' + display_default: + type: boolean + label: 'Displayed by default' + target_bundle: + type: string + label: 'Target bundle' field.image.instance_settings: type: mapping @@ -117,6 +129,9 @@ field.image.instance_settings: default_image: type: field_default_image label: 'Default value' + handler: + type: string + label: 'Handler' field.image.value: type: sequence diff --git a/core/modules/menu_ui/config/schema/menu_ui.schema.yml b/core/modules/menu_ui/config/schema/menu_ui.schema.yml index ce6be8b..7625f0d 100644 --- a/core/modules/menu_ui/config/schema/menu_ui.schema.yml +++ b/core/modules/menu_ui/config/schema/menu_ui.schema.yml @@ -24,3 +24,6 @@ menu.entity.node.*: sequence: - type: string label: 'Menu machine name' + parent: + type: string + label: 'Parent' diff --git a/core/modules/path/config/schema/path.schema.yml b/core/modules/path/config/schema/path.schema.yml new file mode 100644 index 0000000..f595e4b --- /dev/null +++ b/core/modules/path/config/schema/path.schema.yml @@ -0,0 +1,8 @@ +# Schema for the configuration files of the Path module. + +entity_form_display.field.path: + type: entity_field_form_display_base + label: 'Link format settings' + mapping: + settings: + type: sequence diff --git a/core/modules/shortcut/config/schema/shortcut.schema.yml b/core/modules/shortcut/config/schema/shortcut.schema.yml index daef434..9332699 100644 --- a/core/modules/shortcut/config/schema/shortcut.schema.yml +++ b/core/modules/shortcut/config/schema/shortcut.schema.yml @@ -10,9 +10,3 @@ shortcut.set.*: label: type: label label: 'Label' - links: - type: sequence - label: 'Shortcuts' - sequence: - - type: string - label: 'Shortcut' diff --git a/core/modules/taxonomy/config/schema/taxonomy.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.schema.yml index c3d0bd4..9ca7666 100644 --- a/core/modules/taxonomy/config/schema/taxonomy.schema.yml +++ b/core/modules/taxonomy/config/schema/taxonomy.schema.yml @@ -54,6 +54,12 @@ field.taxonomy_term_reference.settings: parent: type: integer value: 'Parent' + target_type: + type: string + label: 'Target type' + target_bundle: + type: string + label: 'Target bundle' field.taxonomy_term_reference.instance_settings: type: sequence