Follow up for #1953404: Add config schema to field and instance config entities
Part of #1983894: Provide config schema to field types and storage in email module

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

Schema not in place
field.email.settings
field.email.instance_settings
field.email.value

field_widget.email_default.settings

Files: 
CommentFileSizeAuthor
#13 1983894-field-config-schema-email-13.patch751 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,865 pass(es).
[ View ]
#13 1983894-diff-6-13.txt620 bytesvijaycs85
#9 s01-default-first-try.png438.14 KBYesCT
#6 email-config-schema-1983894-6.patch802 byteshussainweb
PASSED: [[SimpleTest]]: [MySQL] 56,394 pass(es).
[ View ]
#3 1983894-config-schema-email-removed-email-widget.patch2.6 KBswastik1608
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1983894-config-schema-email-removed-email-widget.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#1 1983894-field-config-schema-email-1.patch964 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 56,092 pass(es).
[ View ]
#1 field.field_.email_.png34.18 KBvijaycs85
#1 field.instance.email_.png42.74 KBvijaycs85

Comments

Status:Active» Needs review
StatusFileSize
new42.74 KB
new34.18 KB
new964 bytes
PASSED: [[SimpleTest]]: [MySQL] 56,092 pass(es).
[ View ]

Initial patch with config inspector screenshots.

Title:Provide config schema to field types, widgets and storage in email moduleProvide config schema to field types and storage in email module
Status:Needs review» Needs work

Widget needs to go out after #1875992: Add EntityFormDisplay objects for entity forms got in.

Status:Needs work» Needs review
StatusFileSize
new2.6 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1983894-config-schema-email-removed-email-widget.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

removed email widget settings form 1983894-field-config-schema-email-1.patch file

Status:Needs review» Needs work

The last submitted patch, 1983894-config-schema-email-removed-email-widget.patch, failed testing.

The patch in #3 appears to be of a completely different issue. It doesn't look related to anything in #1.

Status:Needs work» Needs review
StatusFileSize
new802 bytes
PASSED: [[SimpleTest]]: [MySQL] 56,394 pass(es).
[ View ]

I am basing off the changes from the work in #1983906: Provide config schema to field types and storage in link module. I am hoping this works.

I created the patch first.Provided the schema for the configuration files of the Email module.Enabled the email module and added the field "email" to a content type.Then checked the value of the field type "email" with the valid and invalid values.Everything is working fine as expected.

Status:Needs review» Reviewed & tested by the community

StatusFileSize
new438.14 KB

If testing this,
be sure to enable the
E-mail
module

I added an email field (named myemail) to article
so could look at
http://localhost/drupal2/admin/reports/config-inspector/field.instance.n...
and
http://localhost/drupal2/admin/reports/config-inspector/field.field.fiel...

and I can see the default settings have an effect

s01-default-first-try.png

but I'm having trouble seeing the other bits,

+field.email.settings:
+  type: sequence
+  label: 'E-mail settings'
+  sequence:
+    - type: string
+
+field.email.instance_settings:
+  type: mapping
+  label: 'E-mail settings'
+  mapping:
+    user_register_form:
+      type: boolean
+      label: 'Display on user registration form.'

so I added an email field at
http://localhost/drupal2/admin/config/people/accounts
but I stil dont see those. how did you get "Email settings"?

Status:Reviewed & tested by the community» Needs work

Can some answer YesCT's question from the review in #9... how did you get "Email settings"?

Actually I know this is wrong now because we no longer have the 'Display on user registration form" code because we now do this with form display modes :)

I wish I had read the comment in #10 in detail. I spent quite some time analyzing what would that 'user_register_form' do only to realize it doesn't seem to be doing anything anymore. I was going to post another patch with that block removed, which led to a problem.

Once we remove the 'user_register_form' setting, there is nothing else in the instance_settings field. Should we let it stay anyway? This way:

field.email.instance_settings:
  type: mapping
  label: 'E-mail settings'
  mapping:

Or should we remove this block entirely?

And to respond to the question in #9, the field.email.settings block (marked in orange) is seen in the right-most screenshot close to the bottom (just below the 'Default value function' text box. It is empty because nothing has been stored in that setting. I confirmed this with config inspector screens for other field instances as well.

Status:Needs work» Needs review
Issue tags:+LONDON_2013_JULY
StatusFileSize
new620 bytes
new751 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,865 pass(es).
[ View ]

Adding changes for #11.

Was going to review this one. But then i bounced on this issue #2053245: Default value of email field is not saved anymore.
The patch looks good, but will wait to set this to RTBC when i can validate it with config inspector.

I will have a look at this.

Status:Needs review» Reviewed & tested by the community

Looks good to me.

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

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

Issue summary:View changes

Missing link to meta