Problem/Motivation
Values saved from the Config panel keep the strings the form posts. For a source nested in a component, booleans are published as '1', and slot weights as '0'.
Steps to reproduce
- Add a page layout with a component that uses the Menu source for a prop, with "Expand all menu links" ticked.
- In the builder, change the menu depth, then Publish.
- Run
drush config:get on the page layout: expand_all_items: '1', not true.
Proposed resolution
Cast the saved source data to its config schema, and block settings to the block schema, as config does on save.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ✅ Automated unit/functional testing coverage
- ❌ Code review by maintainers
The tests cover the cast itself. A kernel test through the Config panel request is missing, as the component form did not take posted values in a kernel test.
AI-Generated: Yes
Comments
Comment #2
rajab natshahPublishing a display installed from config also fills in
dependencies: that is expected, they are calculated once the builder is used. The field formatter source dropslabel: hidden, which the formatter source never uses, so the output stays the same. The type changes are this issue.AI-Generated: Yes
Comment #4
pdureau commentedIt may be a UI Patterns ticket about missing config schema. What do you think @mogtofu33 and @just__like_good_vibes ?
Comment #5
pdureau commentedHi Mikael, can we have a talk about this?