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

Provide 6 UI port for MultiValueChildNodeTransformer

    XMLWordPrintable

Details

    Description

      Original ticket description

      Fields which use Nodes to store values will mutate Parent when creating a new child.

      When creating a content app where you can nest nodes, you might run into following issue.

      Given an item type whose form contains following multiValue Field:

      - name: regions
        fieldType: multiValue
        label: Rehions
        transformerClass: info.magnolia.ui.form.field.transformer.multi.MultiValueChildNodeTransformer
        field:
          name: region  
          fieldType: select
          label: Region
          options:            
            - name: north
              value: north
              label: North  
          
            - name: east
              value: east
              label: East
      
            - name: west
              value: west
              label: West
      
            - name: south 
              value: south
              label: South
      

      Magnolia 5 UI framework compatibility issue

      Now in your content app you'd create an item which has north and west as values in the region field. Then you create a new item below aforementioned item. First you'd notice that the values off the parent item are already entered in the form for this new item. If you now remove those and replace the values for the region field with south and east and save the form, you can observe that the values in the parent item have been also changed accordingly!

      I've traced it down to an issue with JcrNewNodeAdapter which is itself not an actual JcrItem so that composite fields and such would end up reading/writing values to the parent item.

      As a workaround i've sublcassed JcrContentConnector and modified it so that it'll create an actuall Jcr Node if it's asked for a new Item Id. I've attached the code in this issue.

      Magnolia 6 new UI Framework incompatibility issue

      • Now in Magnolia 6 new UI Framework, we are missing an equivalent definition for MultiValueChildNodeTransformer. This makes customers having existing content cannot migrate to the new UI Framework. Content cannot be mapped and displayed properly anymore.

      Workaround

      • A workaround for the new UI Framework to have backward compatibility is expected as a temporary solution.
         

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                asiska Adam Siska
                martyglaubitz Marty Glaubitz
                Votes:
                0 Vote for this issue
                Watchers:
                8 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 - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 2h 13m
                      2h 13m