Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6180

i18nContentSupport fails to get translated MultiValueField

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • None
    • 5.3.7
    • i18n
    • None

      Hello Magnolians,

      when I want to retrieve a MultiValueField property from a node in a language other than the default one the I18nContentWrapper fails to deliver it.
      I attached the freemarker script and screenshots from the JCR Browser and the dialog configuration.

      It seems that the Problem is caused by the isEmpty() Method in I18nContentWrapper:398. It checks only for String Value and not for Values[].

      To reproduce:
      Node contentNode = contentMap.getJCRNode();
      Value[] values = contentNode.getProperty("seminars").getValues();
      if the language is not the default one and the property "seminars_fr" exists an exception is thrown by the isEmpty() method.

      I wrote a workaround in a model class that works, but it s not nice because I do what the I18nNodeWrapper should do. (See attached file)

        Acceptance criteria

          1. Dialog-Configuration.jpg
            Dialog-Configuration.jpg
            211 kB
          2. JCR-browser.jpg
            JCR-browser.jpg
            220 kB
          3. Komponent-Multivaluefield.jpg
            Komponent-Multivaluefield.jpg
            157 kB
          4. seminarList.ftl
            1.0 kB
          5. workaround-in-java.txt
            0.8 kB

              Unassigned Unassigned
              pierre Pierre Sandrin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD