Problem/Motivation
In my module I have file in config\install
When I run kernel test I have:
Drupal\Core\Config\Schema\SchemaIncompleteException : Schema errors for core.entity_form_display.node.rfq.default with the following errors: core.entity_form_display.node.rfq.default:content.rg_rfq_phone.third_party_settings.conditional_fields.297afe57-fca6-49d3-b03c-74d7e911b59f.settings.values variable type is string but applied schema class is Drupal\Core\Config\Schema\Sequence
In core.entity_form_display.node.rfq.default.yml I have:
rg_rfq_phone:
weight: 6
settings:
placeholder: ''
third_party_settings:
conditional_fields:
297afe57-fca6-49d3-b03c-74d7e911b59f:
dependee: rg_rfq_contact_type
settings:
state: visible
condition: value
grouping: AND
values_set: 1
value: ''
values: "call\r\nwhatsapp"
value_form:
-
value: call
-
value: whatsapp
effect: fade
effect_options: {}
selector: ''
reset: false
entity_type: node
bundle: rfq
type: telephone_default
region: content
Comments
Comment #2
super_romeo commentedComment #3
super_romeo commentedComment #4
heddnDuplicate of #2948786: Fix config schema for value_form component.
Comment #5
sorlov commented@heddn, described issue was about values key in settings, not value_form
For example, when I made next set of values in condition
I got next in config
You can see values: "2\r\n3\r\n4" here, while according to config schema, values is supposed to be sequence of string values
Comment #6
sorlov commentedComment #10
damienmckennaI turned patch #6 into a MR.
Comment #11
damienmckennaI found that I also had to edit the default settings in src/Conditions.php, otherwise the bug persisted.
Comment #12
damienmckennaIt might be worth adding an update script to fix existing configuration.
Comment #13
damienmckennaI think the test failures are related to changes in core, rather than something from this MR.
Comment #14
benstallings commentedThis looks correct and ready to merge.