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

Details

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

    Description

      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
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

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