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

i18nContentSupport fails to get translated MultiValueField

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Neutral
    • Resolution: Unresolved
    • Affects Version/s: 5.3.7
    • Fix Version/s: None
    • Component/s: i18n
    • Labels:
      None

      Description

      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)

        Attachments

        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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            pierre Pierre Sandrin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: