getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Switching language in multilanguage site.yml with translatable fields always show their default language value. #3882

Closed REHvision closed 2 years ago

REHvision commented 2 years ago

Describe the bug
In a multilanguage setup with translatable fields in site.yml, the value of those fields will always show the default language value when switiching language. The content files for secondary languages get created correctly and have the translated text inside, though. Also e.g. pages sections update accordingly and show translated titles, so this is only about form fields and only on site.

To Reproduce
Steps to reproduce the behavior:

  1. Have a multilanguage setup and add a secondary language
  2. Add a field to site.yml and enter some value in primary language
  3. Switch to secondary language and enter another value
  4. Reload the panel and see the primary language's value in the field again. Optionally) See the created content file having the correct translation. Optionally) See pages sections with translated page titles show the current selected translation of the title.

Expected behavior
Fields in site.yml should behave the same way as on every other page when switching language.

Kirby Version
Kirby 3.6 RC2

Desktop (please complete the following information):

distantnative commented 2 years ago

Is this issue new in 3.6-rc or also present in 3.5.x?

afbora commented 2 years ago

I couldn't reproduce the issue? My steps right?

switch

REHvision commented 2 years ago

Ok thank you for confirming and sorry for bothering! You are right, it wasn't Kirby's fault and I didn't try with clean install, only checked if plugins are in the compatibility list before upgrading to 3.6 :see_no_evil: So I switched back to Kirby 3.5.7 and the problem persisted so I disabled all page methods, config settings and plugins one by one to narrow it down.

It suddenly started to work again as expected when I disabled the sitemapper plugin by kirbyzone (https://github.com/kirbyzone/sitemapper) which is not on the list for compatibility issues. I wasn't suspecting this plugin to change something in Kirby's behavior and thought it's only gathering information to display the sitemap accordingly.

I haven't investigated further into the plugin yet but I'll close this issue here so you don't have to mind it anymore.

Would you add the plugin to the compatibility list although it broke multilanguage setup before 3.6 already, as it seems?

afbora commented 2 years ago

Thank you for digging issue.

Pinging @kirbyzone to check out before adding to compatibility list.