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 file module.
Schema in place

Schema not yet in place



vijaycs85’s picture

Status:Active» Needs review
new45.69 KB
new36.33 KB
new1.56 KB
PASSED: [[SimpleTest]]: [MySQL] 54,563 pass(es). View

Initial patch...

swentel’s picture

Title:Provide config schema to field types, widgets and storage in file module» Provide config schema to field types and storage in file module
Status:Needs review» Needs work
piyuesh23’s picture

new1.39 KB
PASSED: [[SimpleTest]]: [MySQL] 56,373 pass(es). View

Removed widget out of the previous patch. Attaching the new patch here.

piyuesh23’s picture

Status:Needs work» Needs review
chr.fritsch’s picture

new652 bytes
new1.2 KB
PASSED: [[SimpleTest]]: [MySQL] 57,824 pass(es). View
  1. Removes mapping for user_register_form because there is no need since #1465774: Provide a 'Hidden' field widget is fixed.
  2. Changed label of description_field mapping to 'Enable Description field' because thats how it appears in the UI
  3. What about the display_default? It doesn't appear in UI. Is that correct?
  4. Removed field.file.value. Can't see the reason for that. It's not possible to have a default value in files

I looked at the config inspector, checked the types and for me everything looks fine. But why is the uri_scheme a string? In the UI there is just one radio button.

swentel’s picture

new21.86 KB

The 'display_default' checkbox pops up when you toggle 'Enable display field' on the field settings screen.

Screen Shot 2013-08-01 at 20.00.07.png

Cyberschorsch’s picture

Assigned:Unassigned» Cyberschorsch
Cyberschorsch’s picture

Assigned:Cyberschorsch» Unassigned
Status:Needs review» Reviewed & tested by the community

I have tested patch #5 manually with success. All settings are stored correctly and nothing is missing. Marking as RTBC

YesCT’s picture

Status:Reviewed & tested by the community» Needs review
new515 bytes
new1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 59,092 pass(es). View
new139.13 KB
new957.58 KB

1. I made a file field on articles. the instance settings were in field.instance.node.article.field_thefile.yml
where are the global file field settings stored, the stuff field.file.settings describes, like upload destination?

2. huh. config_inspector is not listing:

@Cyberschorsch how did you get config inspector to show you the form it built for the global (non instance) settings?


+++ b/core/modules/file/config/schema/file.schema.yml
@@ -21,3 +21,34 @@ file.settings:
+    display_default:
+      type: boolean
+      label: 'Display default'

Display default is really Files displayed by default in the ui (for example: admin/structure/types/manage/article/fields/node.article.field_thefile/field)

this patch fixes that.

4. in #5 @chr.fritsch asked

But why is the uri_scheme a string? In the UI there is just one radio button.

Because those global filed settings are stored in, for example, field.field.node.field_thefile.yml
and there it might be like:
  uri_scheme: private
a string
A: trying without config inspector just to compare the strings in the ui with the labels in the schema, and the types in the actual config files that were saved with the types in the schema

B: partial config inspector:

YesCT’s picture

The label on both of those says "File settings".
One is in edit (the instance ones), and one is in Field settings (the global/non-instance ones)

Renaming non instance field settings to global field settings, might help. #1855002: "Field settings" tab needs renaming to "Field storage settings"

aspilicious’s picture

Issue summary:View changes
Status:Needs review» Needs work

field.file.value is missing I think. (there are some troubls with default value)

vijaycs85’s picture

Status:Needs work» Needs review
new68.85 KB
new67.21 KB
new540 bytes
new1.33 KB
PASSED: [[SimpleTest]]: [MySQL] 59,477 pass(es). View

As there is no default, just updating it with sequence...

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community

I think this one is ready now

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Status:Fixed» Closed (fixed)

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