This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.

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. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.

Proposed solution

Create a configuration schema for dblog module.

Schema in place

Schema not yet in place
dblog.settings.yml

Files: 
CommentFileSizeAuthor
#15 dblog-after.png528.49 KBYesCT
#15 1912316-dblog-schema-15.patch473 bytesYesCT
PASSED: [[SimpleTest]]: [MySQL] 52,307 pass(es). View
#15 interdiff-12-15.txt410 bytesYesCT
#13 dblog-compare.png575.04 KBYesCT
#12 dblog-schema-form.png20.24 KBsandipmkhairnar
#12 1912316-dblog-schema-12.patch453 bytessandipmkhairnar
PASSED: [[SimpleTest]]: [MySQL] 52,253 pass(es). View
#10 1912316-dblog-schema-10.patch534 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 50,588 pass(es). View
#10 1912316-diff-8-10.txt426 bytesvijaycs85
#8 1912316-dblog-schema-8.patch540 bytesvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View
#8 1912316-diff-6-8.txt414 bytesvijaycs85
#6 1912316-dblog-schema-5.patch522 bytesvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View
#6 1912316-diff-4-5.txt542 bytesvijaycs85
#4 1912316-dblog-schema-4.patch360 bytesvijaycs85
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

Comments

torpy’s picture

Status: Active » Closed (duplicate)

This looks like it was fixed in #1493108: Convert logging and error settings to configuration system (commit #04a2523). Marking this as a duplicate.

heyrocker’s picture

Status: Closed (duplicate) » Active

That issue was about converting the settings to the config system, this issue is about creating the metadata schema for them. This schema was introduced in #1910624: [META] Introduce and complete configuration schemas in all of core and so none of the core settings have yet had schemas created (other than the ones converted as part of that patch.)

http://drupal.org/node/1905070 introduces the system and contains documentation on creating the schema files.

Gábor Hojtsy’s picture

Add config schema tag instead of sprint.

vijaycs85’s picture

Status: Active » Needs review
FileSize
360 bytes
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

Adding schema file

Status: Needs review » Needs work

The last submitted patch, 1912316-dblog-schema-4.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
542 bytes
522 bytes
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

updating wrong settings key

Status: Needs review » Needs work

The last submitted patch, 1912316-dblog-schema-5.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
414 bytes
540 bytes
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

Updating mapping element.

Status: Needs review » Needs work

The last submitted patch, 1912316-dblog-schema-8.patch, failed testing.

vijaycs85’s picture

FileSize
426 bytes
534 bytes
PASSED: [[SimpleTest]]: [MySQL] 50,588 pass(es). View

Updating space issue on "mapping"...

vijaycs85’s picture

Status: Needs work » Needs review
sandipmkhairnar’s picture

FileSize
453 bytes
PASSED: [[SimpleTest]]: [MySQL] 52,253 pass(es). View
20.24 KB

updating schema as per code style in http://drupal.org/node/1905070#codestyle and verified in config_inspector
schema form

YesCT’s picture

Status: Needs review » Needs work
FileSize
575.04 KB

http://drupal.org/node/1905070#codestyle looks good for the schema.

but I think we can improve this to use the same label as is used in the ui. (patch coming)

also of note, small thing is in the data yml file, the integer does not have quotes, the config data in the sites files configHash dir does get quotes after saving the settings in the ui. (not a problem with this patch)

dblog-compare.png

YesCT’s picture

I wonder why the error messages to display are not in the schema or config data.

YesCT’s picture

FileSize
410 bytes
473 bytes
PASSED: [[SimpleTest]]: [MySQL] 52,307 pass(es). View
528.49 KB

patch updates the label to match the label in the ui.

dblog-after.png

YesCT’s picture

Status: Needs work » Needs review
vijaycs85’s picture

@YesCT:

also of note, small thing is in the data yml file, the integer does not have quotes, the config data in the sites files configHash dir does get quotes after saving the settings in the ui.

@alexpott mentioned that we have to have quotes for integer that are getting copied to active folder. So I guess, creating #1930226: Update integer/boolean values with quotes in configuration files. wouldn't hurt but to keep them consistent:)

I wonder why the error messages to display are not in the schema or config data.

This form is defined in system.module and using dblog_form_system_logging_settings_alter(), adding row_limit in this form. Other element (i.e. Logging level) is from system.logging.yml.

YesCT’s picture

ok. that addresses my concerns I think. rtbc from me, but I made the most recent patch...
so if someone else could just give the patch a good look, I think we are good to go here.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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