Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-7022

i18n for switchableField doesn't do fallback

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Resolved
    • Icon: Neutral Neutral
    • None
    • 6.2.10
    • None

      Steps to reproduce

      1. to have a dialog with switchableField with i18n:true, e.g.:

       

      mediaType:
        label: "Media"
        $type: switchableField
        i18n: true
        field:
          $type: radioButtonGroupField
          layout: horizontal
          defaultValue: none
          datasource:
            $type: optionListDatasource
            options:
              - name: none
                label: "None"
                value: none
              - name: image
                label: "Only image"
                value: image
              - name: youtube
                label: Youtube
                value: youtube
              - name: twentythree
                label: Twenty Three
                value: twentythree
        itemProvider:
          $type: jcrChildNodeProvider
        forms:
          - name: youtube
            properties:
              youtube:
                label: "Youtube link"
                $type: textField
              thumbnail:
                label: Select thumbnail
                $type: damLinkField
          - name: twentythree
            properties:
              twentythree:
                $type: textField
                label: "TwentyThree link"
              thumbnail:
                label: Select thumbnail
                $type: damLinkField
          - name: image
            properties:
              image:
                label: Select image
                $type: damLinkField 

       

      2. use this dialog to enter some content for mediaType field (e.g. select image in 

      radioButtonGroupField and then select image from dam)

      3. use this dialogue again, but switch to edit in another language - do not enter anything into 'mediaType' for selected language, just save it without any edits. 

       

      What happens:

      Magnolia will save empty nodes for each language variant:

      Expected results

      If only selected option and provided image is for default language variant, I would expect this being displayed also when previewing the page in any other language.  

      Unfortunately this is not the case, there is no image in other language variants (probably because empty nodes vor each language variant exists)

       

        Acceptance criteria

              Unassigned Unassigned
              tgregovsky Tomáš Gregovský
              Nucleus
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD