Follow up for #1953404: Add config schema to field and instance config entities
Problem/motivation
#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 http://drupal.org/node/1905070. 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
field.file.settings
field.file.instance_settings
field.file.value
field_widget.file_generic.settings
Comment | File | Size | Author |
---|---|---|---|
#12 | 1973522-config-schema-field-file-12.patch | 1.33 KB | vijaycs85 |
#12 | 1973522-diff-9-12.txt | 540 bytes | vijaycs85 |
#12 | Screen Shot 2013-12-11 at 19.39.08.png | 67.21 KB | vijaycs85 |
#12 | Screen Shot 2013-12-11 at 19.38.27.png | 68.85 KB | vijaycs85 |
#9 | arrows-file-field.png | 957.58 KB | YesCT |
Comments
Comment #1
vijaycs85Initial patch...
Comment #2
swentel CreditAttribution: swentel commentedWidget needs to go out after #1875992: Add EntityFormDisplay objects for entity forms got in.
Comment #3
piyuesh23 CreditAttribution: piyuesh23 at QED42 commentedRemoved widget out of the previous patch. Attaching the new patch here.
Comment #4
piyuesh23 CreditAttribution: piyuesh23 commentedComment #5
chr.fritschI 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.
Comment #6
swentel CreditAttribution: swentel commentedThe 'display_default' checkbox pops up when you toggle 'Enable display field' on the field settings screen.
Comment #7
CyberschorschComment #8
CyberschorschI have tested patch #5 manually with success. All settings are stored correctly and nothing is missing. Marking as RTBC
Comment #9
YesCT CreditAttribution: YesCT commented1. 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:
entity.display.node.article.default.yml
entity.form_display.node.article.default.yml
field.field.node.field_thefile.yml
@Cyberschorsch how did you get config inspector to show you the form it built for the global (non instance) settings?
3.
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
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:
Comment #10
YesCT CreditAttribution: YesCT commentedThe label on both of those says "File settings".
Hm.
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"
Comment #11
aspilicious CreditAttribution: aspilicious commentedfield.file.value is missing I think. (there are some troubls with default value)
Comment #12
vijaycs85As there is no default, just updating it with sequence...
Comment #13
aspilicious CreditAttribution: aspilicious commentedI think this one is ready now
Comment #14
webchickCommitted and pushed to 8.x. Thanks!