Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4915

Order of sub-nodes is not maintained in case of a merge

    XMLWordPrintableJSON

    Details

      Description

      Given two content structures that should be merged by the Resource Merger, if the second tree contains all the sub-nodes of the first tree, a new node added in the second tree will always be added towards the end, irrespective of its position in the sub-node tree.

      Example:

      /libs/p1/components/c1
        node1
        node2
        node3
      /libs/p2/components/c1 (sling:resourceSuperType=/libs/p1/components/c1)
        node1
        node4
        node2
        node3
      

      When iterating over the child resources of /libs/p2/components/c1, node4 will be the last child in the iteration instead of the second.

      The workaround is to not define the redundant nodes and add the sling:orderBefore property on node4, however this should be handled by default by the merger.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kwin Konrad Windszus
                Reporter:
                radu Radu Cotescu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: