Open robdekort opened 9 months ago
The fact the default values aren't being saved to the YAML file here won't be such a big deal in Statamic 5 since they'll automatically pull through in templates (or anywhere else augmentation happens) if no value is set. See #9010.
True but it's still weird that they don't get saved. They should.
@duncanmcclean
The fact the default values aren't being saved to the YAML file here won't be such a big deal in Statamic 5 since they'll automatically pull through in templates (or anywhere else augmentation happens) if no value is set. See #9010.
This no longer seems to be the case anymore :( I think the values getting saved would help with debugging aswell as (maybe?) solve this error entirely?
Blueprint:
tabs:
main:
display: Main
sections:
-
fields:
-
handle: type
field:
options:
-
key: column
value: Column
-
key: link
value: Link
type: select
display: Type
localizable: false
default: link
{{ nav:main_navigation }}
{{ title }}
{{ type }}
{{ children }}
{{ title }}
{{ type }}
{{ /children }}
{{ /nav:main_navigation }}
tree:
-
id: 26cf267f-b796-45ff-b9d7-9ba55284f6a6
title: 'Test 1'
data:
type: column
children:
-
id: c4402515-2117-446d-8cb4-01bfe5b491e7
title: Test 2
Result:
Test 1 column
Test 2 column
Bug description
When you edit your navigation blueprint and set default values for certain fields, they don't save. So this example:
Will save like this:
It should be:
There might be more fields (or simply all) where this happens with, but these are the one I've noticed this behaviour for over time. This behaviour is unwanted when you expect data to be there. A workaround is not to set a default and make the field required.
How to reproduce
Thy this navigation blueprint and add an entry and save it (without touching the fields):
Logs
No response
Environment
Installation
Starter Kit using via CLI
Antlers Parser
None
Additional details
No response