Structure field translation on site level (site.yml) reset after saving and refresh

I so far never had any issues with translations, but on one site, I have a problem, and I’m uncertain if it’s Kirby or something else making this happens.

I have a structure field on in the site.yml. The user can set SVG assets for the footer there, along with a text title and a URL.

Now I try to translate this structure field, but it doesn’t work. The panel always picks up the main language content.

  1. I set my logos and save
  2. I switch to another language in the panel
  3. I delete all fields from the structure field and create new ones with the translated logos
  4. I save and the panel shows the update. Also, the content file was updated.
  5. When I hit refresh in the browser, the panel again shows me the content of the main language instead of the translation. Though the content file e.g., site.fr.md, shows the translated content
  6. Possibly, the API then also returns the main language content always instead of the translations, even though the translated content file has the correct, translated content.

I could simply replicate this in the occurring CMS instance by simply creating another structure field in site.yml with only a text field.

Can somebody else replicate this when using a structure field than can be translated, in the site.yml?

I updated Kirby to the latest version to ensure this is not a known issue that might have been patched meanwhile.

Also, I’m using content.extension set to md in the config.php.

make sure you only have multiple site.LANG.txt files and no site.txt (without an language code) file.

Thanks for the input. Though, there is no site.txt (or in my case, no site.md) so that doesn’t seem to be the cause of the issue.

What is your Kirby versions and which plugins do you have installed?

Kirby v3.6.5 (though, happened in v3.6.2 too before I updated).

Plugins (as from composer):

    "php": ">=7.4.0",
    "errnesto/kirby-plugin-webhooks": "^1.0",
    "getkirby/cms": "^3.6",
    "getkirby/kql": "^1.0",
    "sylvainjule/locator": "^1.0",
    "mzur/kirby-uniform": "^5.0",
    "oblik/kirby-variables-field": "^1.2"

The site.yml. footer_logos is the original field, test_field is where I checked if it happens to any structure field.

title: Site

options:
  preview: "{{kirby.option('url_frontend')}}/{{kirby.language}}/{{page.uri}}"

tabs:
  main:
    label:
      de: Übersicht
      en: Overview
    columns:
      left:
        width: 2/3
        sections:
          pages:
            headline:
              de: Seiten
              en: Pages
            type: pages
            status: all
            sortable: false
            sortBy: title asc
            image:
              back: white
      right:
        width: 1/3
        sections:
          settings:
            label:
              de: Allgemein
              en: General
            type: fields
            fields:
              main_navigation:
                label:
                  de: Hauptnavigation
                  en: Main navigation
                type: pages
                translate: false
                image:
                  back: white
              secondary_navigation:
                label:
                  de: Sekundäre Navigation
                  en: Secondary navigation
                type: pages
                translate: false
                image:
                  back: white
              footer_navigation:
                label:
                  de: Fusszeilen-Links
                  en: Footer links
                type: pages
                translate: false
                image:
                  back: white
              test_field:
                type: structure
                fields:
                  text:
                    type: text
              footer_logos:
                label:
                  de: Fusszeilen-Logos
                  en: Footer logos
                type: structure
                fields:
                  name:
                    label: Name
                    type: text
                    required: true
                  logo:
                    label:
                      de: Logo
                      en: Logo
                    type: files
                    query: site.files.filterBy('extension', 'svg')
                    uploads:
                      parent: site
                      template: svg
                    required: true
                  href:
                    label: Link
                    type: url

  translations:
    label:
      de: Übersetzungen
      en: Translation
    sections:
      translations:
        type: fields
        fields:
          list:
            label:
              de: Allgemein
              en: General
            type: variables
            editor:
              sort: true
              mutate: true
  settings:
    label:
      de: Einstellungen
      en: Settings
    fields:
      terms_privacy:
        label:
          de: Datenschutzvereinbarung
          en: Privacy policy
        help:
          de: Wähle die Seite, welche die Datenschutzvereinbarung enthält. Diese wird dann vor der Verarbeitung von Benutzerdaten, beispielsweise bei Formularen, angezeigt und verlinkt.
          en: Choose the page containing the privacy policy. This page will be linked and shown in all cases of user data collection, e.g. in forms.
        type: pages
        multiple: false
        translate: false
      terms:
        label:
          de: Allgemeine Geschäftsbedingungen (AGB)
          en: Terms and conditions
        help:
          de: Wähle die Seite, welche die AGB enthält.
          en: Choose the page containing the terms and conditions. This page will be linked and shown in all cases of user data collection, e.g. in forms.
        type: pages
        multiple: false
        translate: false
      event_signup_recipient:
        label: Veranstaltungsanmeldungen senden an
        type: email
      webhooks:
        label: Webhooks
        type: structure
        help:
          de: Nur Anfassen, wenn du weisst was du tust.
          en: Only touch if you know what you're doing.
        fields:
          url:
            label: URL
            type: url
          payload:
            label: Payload
            type: text
            default: "{}"
          triggers:
            label: Triggers
            type: tags
            options:
              - "page.create:after"
              - "page.update:after"
              - "page.delete:after"
              - "page.changeStatus:after"
              - "page.changeSlug:after"
              - "page.changeTitle:after"
              - "page.duplicate:after"
              - "file.changeName:after"
              - "file.delete:after"
              - "file.replace:after"
              - "file.update:after"
``

I just tested in a fresh Starterkit and cannot reproduce this issue issue.

Please make sure that you don’t have any other extra files next to your site.xx.md, i.e. file meta data files that do not belong to a file.

Thank you for taking the time having another pair of eyes on this. I appreciate it.

I will therefore search on my side what’s going wrong.