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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vijaycs85’s picture

Status: Active » Needs review
FileSize
42.74 KB
34.18 KB
964 bytes

Initial patch with config inspector screenshots.

swentel’s picture

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

Status: Needs work » Needs review
FileSize
2.6 KB

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.

hussainweb’s picture

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

hussainweb’s picture

Status: Needs work » Needs review
FileSize
802 bytes

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.

neetu morwani’s picture

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.

neetu morwani’s picture

Status: Needs review » Reviewed & tested by the community
YesCT’s picture

FileSize
438.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"?

alexpott’s picture

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 :)

hussainweb’s picture

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?

hussainweb’s picture

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.

vijaycs85’s picture

Status: Needs work » Needs review
Issue tags: +LONDON_2013_JULY
FileSize
620 bytes
751 bytes

Adding changes for #11.

nils.destoop’s picture

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.

yanniboi’s picture

I will have a look at this.

nils.destoop’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

Hydra’s picture

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.

Anonymous’s picture

Issue summary: View changes

Missing link to meta