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

Multivalue composite fields not supporting I18N despite i18n:true setting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • None
    • 5.4.1
    • dialogs, forms

      A multivalue composite field in Magnolia 4.5.1 CE does not support I18N even though i18n is set to true in all sections of the dialog definitions.

      In my yaml, I have set i18n: true in every section, however, in the dialog I can only provide one value for the fields for all languages, they don't have I18N support.

      In my example, the relevant fields are the "features", which each holds a title and an image.

      My .yaml:

      actions:
        cancel:
          class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition
        commit:
          class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
      
      form:
        label: Abschnitt
        tabs:
          - name: tabMain
            label: Abschnitt
            fields:
              - name: image
                class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
                targetWorkspace: dam
                appName: assets
                identifierToPathConverter:
                  class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
                contentPreviewDefinition:
                  contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
                label: Bild
                required: false
                i18n: true
              - name: bodyText
                class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
                configJsFile: /.resources/sorba-templates/webresources/ckeditor/config-magnolia.js
                rows: 6
                label: Text
                required: true
                source: true
                i18n: true
              - name: features
                class: info.magnolia.ui.form.field.definition.MultiValueFieldDefinition
                label: Features
                i18n: true
                transformerClass: info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer
                field:
                  name: compositeField
                  class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
                  transformerClass: info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer
                  layout: vertical
                  i18n: true            
                  fields:
                    - name: title
                      class: info.magnolia.ui.form.field.definition.TextFieldDefinition
                      label: Titel
                      i18n: true
                      required: true
                    - name: image
                      class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
                      targetWorkspace: dam
                      appName: assets
                      identifierToPathConverter:
                        class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
                      contentPreviewDefinition:
                        contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
                      label: Bild
                      required: true
                      i18n: true
      

      The dialog only supports I18N for all other fields except for the "features" and the fields of such (title, image):

      (Problem originally posted on StackOverflow: http://stackoverflow.com/questions/32829491/magnolia-how-to-enable-i18n-in-a-multivalue-composite-field)

        Acceptance criteria

              mgeljic Mikaël Geljić
              mathiaslin Mathias Conradt
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD