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

CompositeTransformer is adding basePropertyName to the property name, resulting in incorrect properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 5.4.3
    • 5.4.2
    • forms
    • Kromeriz 13
    • 2

      Somehow, when using the SwitchableFieldDefinition (link from the MTE), the properties are stored incorrect. The LinkModel from the MTE cannot read the correct properties and no link and title are shown.

      It seems to be in the CompositeTransformer#getCompositePropertyName() method.
      The field definition is i18n, so the propertyName (linkTypeexternal) will be appended by the basePropertyName ('linkType'). This results in the field 'linkTypeexternallinkType'.

      See issue MTE-46.


      More info from duplicate (and closed) issue.

      Due to incomplete implementation of property name generation, info.magnolia.ui.form.field.transformer.composite.SwitchableTransformer now prepends (parent's) fieldname once more resulting in wrong and unexpected property names, also see protected String definePropertyName() and protected String deriveLocaleAwareName(String).

      Instead of:

      linkType=internal
      linkTypeinternal=acc832d1-4302-4812-a13d-b7446d302dfe
      

      it creates

      linkTypelinkType=internal
      linkTypeinternallinkType=acc832d1-4302-4812-a13d-b7446d302dfe
      

        Acceptance criteria

              efochr Evzen Fochr
              jdiepeveen Jordie Diepeveen
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 4h 40m
                    4h 40m