Problem/Motivation
Conditional Fields saves the “Set of values” textarea as a newline-separated string. However, conditional_fields.settings.values is defined as a sequence of strings.
This causes a configuration schema warning:
settings.values variable type is string but applied schema class is Drupal\Core\Config\Schema\Sequence
Reproduced with Conditional Fields 4.0.0-alpha6 on Drupal 11.4.
Steps to reproduce
1. Add a dependency using the “Value” condition.
2. Select “Any of these values (OR)”.
3. Enter multiple values in “Set of values”, one per line, as instructed:
51
85
105
4. Save the dependency.
5. Validate or inspect the form display configuration schema.
Actual stored configuration:
values: "51\r\n85\r\n105"
Expected configuration:
values:
- '51'
- '85'
- '105'Proposed resolution
Normalize the textarea input into an array of strings in ConditionalFieldEditForm::submitForm() before copying it into the component settings.
User interface changes
None.
API changes
None. Saved values conform to the existing configuration schema.
Data model changes
None.
Issue fork conditional_fields-3634624
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
yan commented