Problem
The configuration settings for contact module look like this:
default_category: feedback
flood:
limit: '5'
interval: '3600'
user_default_enabled: '1'
The schema introduced however lists "user_default_enabled" at the wrong indentation level and therefore not on one level with "flood" and "default_category":
# Module settings
contact.settings:
type: mapping
mapping:
"default_category":
type: string
"flood":
type: mapping
mapping:
"limit":
type: integer
"interval":
type: integer
"user_default_enabled":
type: boolean
The fix is easy, the indentation needs to be fixed for user_default_enabled.
Found with the D8 configuration inspector sandbox module at http://drupal.org/sandbox/reyero/1635230
Comment | File | Size | Author |
---|---|---|---|
#27 | 1922178-contact-schema-fix-27.patch | 684 bytes | vijaycs85 |
#25 | 1922178-contact-schema-fix-25.patch | 900 bytes | vijaycs85 |
#21 | 1922178-contact-schema-fix-21.patch | 1.57 KB | vijaycs85 |
#21 | 1922178-diff-14-21.txt | 443 bytes | vijaycs85 |
#14 | 1922178-contact-schema-fix-13.patch | 1.56 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Patch looks fixing the problem of intention. Setting it to RTBC, if test is green.
Comment #2
andypost+1 here
Comment #4
vijaycs85contact-schema-fix.patch queued for re-testing.
Comment #5
vijaycs85Green... good to go.
Comment #6
Gábor HojtsyAdd missing tag.
Comment #7
Gábor HojtsyNeeds a reroll given that #1914366: Move all configuration schema files into a schema subdirectory landed.
Comment #8
vijaycs85Re-rolling...
Comment #9
Gábor HojtsyComment #10
Gábor HojtsyInstead of doing fixes one-by-one in different issues, what about fixing the code style as well as the missing labels too, while we are at this? :) Remove quotes around the nested levels, remove comment from above sections, add labels, etc.
Comment #12
vijaycs85Adding coding style fixes (Ref:http://drupal.org/node/1905070#codestyle) and label. Updating title to reflect changes... Needs summary update.
Comment #13
Gábor HojtsyMy patch had better labels :) Also removed more useless comments :)
Comment #14
vijaycs85Updating labels from #10 and attaching screenshot of e-mail element label fix.
Comment #15
vijaycs85Needs work in terms of "key" .
Comment #16
tstoecklerRe #15: Can you clarify what needs work, I couldn't find anything to complain. :-)
Comment #17
vijaycs85We should avoid quotes for keys.
Comment #18
vijaycs85I was wrong at #17. seems we are good to go with the patch in #14
Comment #19
vijaycs85Comment #20
Gábor HojtsyLooks good. Only found one minor issue then should be RTBC.
The module name would be uppercases "Contact", right according to our current recommendations?
Comment #21
vijaycs85We agreed that we don't generate patch just for this change :) However I've updated it...
Comment #22
Gábor HojtsyWell, since we touch that line anyway I think this made lots of sense. Looks good to me.
Comment #23
webchickShoot, this no longer applies now, sorry!
Comment #24
Gábor HojtsyFound one more issue while integrating contact translations with the config_translation module. 'string' should be used as an internal type for strings. The 'label' and 'text' types are to be used for human facing strings editable on the admin UI, like the label of the contact category (should use 'label' type) and the autoreply text (should use 'text' type). As-is the schema now, there are no translation-exposed strings in the configuration, even though category names and autoreply texts should be exposed. Needs work for this too, not only needing a reroll.
Comment #25
vijaycs85Seems patch already went in :) not sure we got any duplicate with same code change. So adding patch with changes for #24.
Comment #26
Gábor HojtsyYeah, seems like the above patch was already committed somehow.
Should still be a string. This is a machine name reference to the machine name of the default contact category, *not* a label.
Comment #27
vijaycs85Thanks, thought that is not label :)
Comment #28
Gábor HojtsyAll right, since the original patch was committed here, let's move this instead as the initial patch to #1947810: Some string/label types improperly assigned in configuration schemas as per our IRC discussion. Marking as fixed based on the commit of the original patch.
(Dries committed this 6 days ago at http://drupalcode.org/project/drupal.git/commit/0a82a3fc14189caf932510e1...).
Comment #29.0
(not verified) CreditAttribution: commentedAdd schema snippet.