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

multi-reference properties are broken - storing paths instead of UUID

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 6.1
    • 6.1
    • None
    • None
    • 6.1 Release Sprint

      When a CT has a reference property to another property, and it is marked as "multiple", then the generated app does not correctly configure the identifierToPathConverter node. Thiis causes links to be stored as paths instead of UUID's, which will cause problems in templating and other places.
      (identifierToPathConverter has no "class" property)

      When the CT property is not multiple, then the identifierToPathConverter is created correctly in the app.
      (identifierToPathConverter has the correct "class" property: "info.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter")

      Given we have a CT with a CT-based app,
      when the CT defines a filed with a reference to another type, and if the field allows multiple values:

      # ...
      model:
        nodeType: mt:tourOffice
        properties:
          - name: tourGuides
            type: reference:tourGuide
            multiple: true
      # ...	  
      

      Then the definition app claims a MINOR PROBLEM

      Definition: tourOffices-app
      Origin: /content-type-examples/apps/tourOffices-app.yaml
      Details: Property [identifierToPathConverter] is set to null in definition.
      Location: tourOffices-app/subApps/detail/editor/form/tabs/default/{name=name, i18n=false, required=true, type=String, fieldType=text}/tourGuides/tourGuides/identifierToPathConverter
      Type: Source data processing problem
      Severity: MINOR
      

      When removing the multiple: true, there is no more problem.

      This is a regression.

      The given example has worked. (GIT: content-type-examples).
      The above linked repos also contains bootstrpable data, which was produced months ago. In this (old) data, the multi-value content is stored like this:
      [551d6005-20ec-4216-907b-87a0fd3f99b6, 58ba8e48-f404-4593-90b0-19116bcfed10].
      When I create a new Tour office right now, the data now is stored with the node-path and not with the node-UUID (anymore).

        Acceptance criteria

              mgeljic Mikaël Geljić
              cmeier Christoph Meier
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.75d
                    0.75d