kirby icon indicating copy to clipboard operation
kirby copied to clipboard

Default not stored on field with translate: false, when creating from secondary lang

Open plagasul opened this issue 2 years ago • 4 comments

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

  1. On a site with at least two languages, create a blueprint that includes such a field, example:
test:
    type: number
    default: 1
    translate: false
  1. Switch to the secondary language
  2. Create a new instance of the page containing the field
  3. 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

plagasul avatar Oct 26 '21 19:10 plagasul

Would like to know if this is not considered a bug, or if there is missing info etc.

Thank you

plagasul avatar Dec 12 '21 12:12 plagasul

@plagasul Your example code should have translate: false instead of translate: true.

texnixe avatar Dec 12 '21 12:12 texnixe

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 ?

plagasul avatar Aug 06 '22 09:08 plagasul

I can confirm it is a bug, though we have not found a fix for it so far

distantnative avatar Aug 06 '22 09:08 distantnative

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.

github-actions[bot] avatar Feb 03 '23 00:02 github-actions[bot]