Problem
When configuration schemas were written, the langcode and uuid keys were not consistently added.
Proposal
1. A langcode can appear in any configuration file, but as a general rule, files which have a label or text type should have a langcode schema key. That is, since the label and text types are used to designate textual configuration that is in a human language, it makes direct sense that the configuration file would define which language is that. This langcode is always at the top level of the file in the top level mapping. The langcode may not appear in the shipped configuration, however it is not a problem to define optional elements in the schema.
2. Any configuration .yml file that is a result of a config entity should have a uuid schema element defined. The configuration entities have uuids to uniquely identify them in the system. The uuid may not appear in the shipped configuration entity, however it is not a problem to define optional elements in the schema.
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#6 | 1947814-langcode-config-schema-6.patch | 8.39 KB | YesCT |
#6 | interdiff-4-6.txt | 2.13 KB | YesCT |
#4 | 1947814-langcode-config-schema-4.patch | 8.38 KB | vijaycs85 |
#4 | 1947814-diff-2-4.txt | 3.32 KB | vijaycs85 |
#2 | 1947814-langcode-config-schema-1.patch | 5.6 KB | vijaycs85 |
Comments
Comment #0.0
Gábor HojtsyEmphasize second condition.
Comment #1
vijaycs85Schemas that are missing langcode:
With label field(s), no langcode:
contact.category.*
image.effects.*
system.site
menu.menu
user.settings
user.role.*
views.view.*
With text field(s), no langcode:
system.maintenance
system.rss
tour.tip.text
views.display.*
views.display.page
views.display.block
Comment #2
vijaycs85Added two additional fixes that are not related to this issue, but good to have here (instead of two novice issues):
1. Added status field to schema for contact.category.*
2. Updating message text with quotes in system.maintenance.yml.
Comment #4
vijaycs85In this patch:
1. Adding UUID to missing config entity's schema
2. Updating shortcut.set.default to shortcut.set.* and created an issue #1964588: Complete Configuration schemas for shortcut module for remaining tasks in this module schema.
3. Updated test cases that are failing in #2
Created new issue for picture module at #1964592: Create configuration schemas for picture module
Comment #5
Gábor HojtsyThat all looks good to me :) Superb.
Comment #6
YesCT CreditAttribution: YesCT commentedextra white space.
a couple extra newlines taken out.
======
This was just the stuff changed in this patch. If we want later, we can do a cleanup through all the schema files.
Comment #7
Gábor HojtsyGood improvements, no change to functionality :)
Comment #8
alexpottCommitted b92c56b and pushed to 8.x. Thanks!
Comment #9
Gábor HojtsySuperb, thanks!
Comment #10
YesCT CreditAttribution: YesCT commentedwhat is status:
in config yml files?
Is it something we should check all the schemas for also? (would need an issue)
See for example the saved active config on the admin user role:
sites/default/files/config_mW...../active/user.role.administrator.yml
and compare it to: core/modules/user/config/schema/user.schema.yml
See #1942178-5: Make User module active config save format match the default yml file.
Comment #11
Gábor HojtsyStatus is a built-in property of config entities, so config entities like user roles, filter formats, etc. can have it. Some config entities redefine exported properties, so maybe not all of them export status.
Comment #13
mradcliffeCreated follow-up minor bug, #2000232: Block schema has two uuid keys.
Comment #13.0
mradcliffeadded meta to add schema as related