kirby
kirby copied to clipboard
Default not stored on field with translate: false, when creating from secondary lang
Describe the bug
If a field has a default value AND is translate: false
AND a page with such field is created while in a secondary language in the panel THEN the default value is not stored at all in the text file
To Reproduce
- On a site with at least two languages, create a blueprint that includes such a field, example:
test:
type: number
default: 1
translate: false
- Switch to the secondary language
- Create a new instance of the page containing the field
- The default value is not stored on the text file, and then not shown on the panel
Expected behavior
The default value should be applied regardess of translate being set to false.
Kirby Version
3.5.6
Desktop (please complete the following information):
- OS: Linux Mint 20.1 Cinnamon
- Browser: Chrome
- Version: 92.0.4515.159
Additional context
I actually think if the value is stored in the default language when translate is [true] or not set, then the same logic should also apply when the translate: false is set. @texnixe
https://forum.getkirby.com/t/when-translate-false-creating-in-second-lang-does-not-apply-default-value/23770/4
Would like to know if this is not considered a bug, or if there is missing info etc.
Thank you
@plagasul Your example code should have translate: false
instead of translate: true
.
This does not seem to have received any attention since I posted it. Is there info missing? Should this be a reccomendation instead of a bug ?
I can confirm it is a bug, though we have not found a fix for it so far
This issue has been automatically marked as stale because it has not had recent activity. This is for us to prioritize issues that are still relevant to our community. It will be closed if no further activity occurs within the next 14 days. If this issue is still relevant to you, please leave a comment.