We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean page fields in lists are saved as '1'/'0' or true/false, depending if the field is in a list or not.
This has changed in 1.7 as 1.6 seems to behave correctly.
Blueprint to reproduce the behaviour:
title: Article '@extends': type: default context: blueprints://pages form: fields: tabs: fields: content: fields: header.boolean_value: type: toggle label: Toggle default: 1 highlight: true options: 1: 'Yes' 0: 'No' validate: type: bool header.list: name: list_of_booleans type: list label: List of booleans fields: .boolean_list_item: type: toggle label: Toggle in a list default: 1 highlight: true options: 1: 'Yes' 0: 'No' validate: type: bool
Saving page in 1.7.0-rc.11 results in the following file content:
1.7.0-rc.11
--- title: test-article boolean_value: true list: - boolean_list_item: '1' ---
The same thing in 1.6.25:
1.6.25
--- title: test-article boolean_value: true list: - boolean_list_item: true ---
Environment: Tested in docker with Dockerfile from https://github.com/getgrav/docker-grav. For 1.7 replaced GRAV_VERSION variable in Dockerfile.
GRAV_VERSION
The text was updated successfully, but these errors were encountered:
I notice that as well but the site seems to be working just fine. I actually prefer this because you can have multiple toogled buttons
Sorry, something went wrong.
The issue also affects old pages (and likely all lists) in Grav 1.7.
Fixed blueprint value filtering in lists [#2923]
a156247
@mloitm Thank you for reporting the issue! I missed a special case causing some lists to be ignored.
mahagr
No branches or pull requests
Boolean page fields in lists are saved as '1'/'0' or true/false, depending if the field is in a list or not.
This has changed in 1.7 as 1.6 seems to behave correctly.
Blueprint to reproduce the behaviour:
Saving page in
1.7.0-rc.11
results in the following file content:The same thing in
1.6.25
:Environment: Tested in docker with Dockerfile from https://github.com/getgrav/docker-grav.
For 1.7 replaced
GRAV_VERSION
variable in Dockerfile.The text was updated successfully, but these errors were encountered: