While working on https://www.drupal.org/node/2648950 noticed error for missing schema for field_date_value.

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.test_filter_datetime with the following errors: views.view.test_filter_datetime:display.default.display_options.filters.field_date_value.value missing schema in Drupal\Core\Config\Testing\ConfigSchemaChecker->onConfigSave() (line 93 of /drupal/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kgoel created an issue. See original summary.

kgoel’s picture

Status: Active » Needs review
FileSize
5.53 KB

Adding failing patch here to display the error described in IS. To replicate the error, I have added value field for field_date_value in core/modules/datetime/tests/modules/datetime_test/test_views/views.view.test_filter_datetime.yml

Status: Needs review » Needs work

The last submitted patch, 2: 2721339-1.patch, failed testing.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

acbramley’s picture

I've seen this as well using a view with a core date field on it, only way around getting the test to run was adding

protected $strictConfigSchema = FALSE;

to the test.

jhedstrom’s picture

+++ b/core/modules/datetime/src/Plugin/views/filter/Date.php
@@ -123,4 +124,19 @@ protected function opSimple($field) {
+  /**
+   * Override parent method to change input type.
+   */
+  public function buildExposedForm(&$form, FormStateInterface $form_state) {
+    parent::buildExposedForm($form, $form_state);
+
+    $field_identifier = $this->options['expose']['identifier'];
+    if ($this->operator == 'between') {
+      $form[$field_identifier]['min']['#type'] = 'date';
+      $form[$field_identifier]['max']['#type'] = 'date';
+    } else {
+      $form[$field_identifier]['#type'] = 'date';
+    }
+  }
+

+++ b/core/modules/datetime/tests/modules/datetime_test/test_views/views.view.test_filter_datetime.yml
@@ -50,7 +88,17 @@ display:
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url
+        - url.query_args
+        - 'user.node_grants:view'
+      tags: {  }

+++ b/core/modules/views/src/Plugin/views/filter/Date.php
@@ -183,4 +183,19 @@ protected function opSimple($field) {
+  /**
+   * Override parent method to change input type.
+   */
+  public function buildExposedForm(&$form, FormStateInterface $form_state) {
+    parent::buildExposedForm($form, $form_state);
+
+    $field_identifier = $this->options['expose']['identifier'];
+    if ($this->operator == 'between') {
+      $form[$field_identifier]['min']['#type'] = 'date';
+      $form[$field_identifier]['max']['#type'] = 'date';
+    } else {
+      $form[$field_identifier]['#type'] = 'date';
+    }
+  }
+

Are these changes related/necessary to reproduce the error? I'm not seeing the connection here...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tacituseu’s picture

Component: other » datetime.module
Berdir’s picture

jhedstrom’s picture

Status: Needs work » Closed (duplicate)

Agreed this is a duplicate.