Follow up for #1953404: Add config schema to field and instance config entities


#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at As a part of schema addition to field module(#1953404: Add config schema to field and instance config entities), found that we have to provide schema for field types, field widgets and field storage.

Proposed solution

Create a configuration schema for field types, field widget and field storage (if applicable) defined in options module.
Schema in place

Schema not yet in place






vijaycs85’s picture

Component:field system» options.module
vijaycs85’s picture

Status:Active» Needs review
new44.43 KB
new40.61 KB
new43.87 KB
new40.49 KB
new40.94 KB
new41.09 KB
new40.5 KB
new41.6 KB
new4.28 KB
PASSED: [[SimpleTest]]: [MySQL] 54,481 pass(es).
[ View ]

Initial patch with config_inspector screenshots...

vyasamit2007’s picture

Status:Needs review» Reviewed & tested by the community
new26.66 KB
new29.1 KB
new37.92 KB
  • The Patch applied properly.
  • The Patch changes are and working as expected.
  • The listed screenshots above are working fine.
  • The new screenshots below are for list_text, datetime and File fields.
Gábor Hojtsy’s picture

Issue tags:+sprint

Putting on sprint for tracking :)

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Wow. This was a much bigger patch than I was picturing when I clicked into this issue. :) Nevertheless, looks good in my quick eyeball, and it looks like it was very thoroughly tested, so good job for that.

Committed and pushed to 8.x. Thanks!

yched’s picture

Thanks @vijaycs85 !

+++ b/core/modules/options/config/schema/options.schema.ymlundefined
@@ -0,0 +1,174 @@
+    allowed_values_function_display:
+      type: string
+      label: 'Allowed values function display'

This doesn't correspond to any actual setting.
Did you include it because you find it saved in actual CMI files ? That would be a bug...

yched’s picture

Status:Fixed» Needs review
new1.43 KB
PASSED: [[SimpleTest]]: [MySQL] 56,882 pass(es).
[ View ]

Hm, right, 'allowed_values_function_display' is just an informational '#type' => 'item' element in the field settings $form, but this ends up as an empty string in the submitted form values.

I opened #1985386: Crufty 'allowed_values_function_display' ends up in list field stored config for this. Meanwhile, we should remove those entries.

swentel’s picture

Status:Needs review» Reviewed & tested by the community

Good to go.

Gábor Hojtsy’s picture

Status:Reviewed & tested by the community» Fixed

The role of the schema is to describe the data format as is available, not to describe what we want it to be. The schema sections should be removed as the data itself is fixed in #1985386: Crufty 'allowed_values_function_display' ends up in list field stored config . Removing it prior would leave that unexplained. I'm going to upload this patch there so it can continue from there.

Gábor Hojtsy’s picture

@vyasamit2007: can you help review the numerous other schema issues for fields at That would be amazing! Thanks!

Gábor Hojtsy’s picture

Issue tags:-sprint

Remove sprint tag.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary:View changes

Updated issue summary.