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

Move operation is not handling same name siblings

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Servlets Post 2.1.0
    • Fix Version/s: None
    • Component/s: Servlets
    • Labels:
      None

      Description

      The move operation does not support same name siblings but always remove childnodes with the same name of the moved node.
      The attached patch checks whether the node is a sns and in this case does not remove the child.

      1. snssupport.diff
        1 kB
        Markus Joschko

        Activity

        Hide
        cziegeler Carsten Ziegeler added a comment -

        Removing from release schedule as we still don't have consensus

        Show
        cziegeler Carsten Ziegeler added a comment - Removing from release schedule as we still don't have consensus
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Postponing to next release as we don't seem to have a clear resolution so far

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Postponing to next release as we don't seem to have a clear resolution so far
        Hide
        jocsch Markus Joschko added a comment -

        There is already a parameter :replace on the operation. And only if this is true, the node should be replaced.
        However the implementation of that parameter in the parent class seems to be a bit flaky as it is not used if a node is moved to a "/" location!

        For me that seems to be a bug in its own but I don't want to modify the code as I don't know why it is implemented the way it is and the intention of it and no unit tests are given.
        Also the code is used as parent for copy and move which makes it even more dangerous to modify it.

        Show
        jocsch Markus Joschko added a comment - There is already a parameter :replace on the operation. And only if this is true, the node should be replaced. However the implementation of that parameter in the parent class seems to be a bit flaky as it is not used if a node is moved to a "/" location! For me that seems to be a bug in its own but I don't want to modify the code as I don't know why it is implemented the way it is and the intention of it and no unit tests are given. Also the code is used as parent for copy and move which makes it even more dangerous to modify it.
        Hide
        justinedelson Justin Edelson added a comment -

        patch isn't backwards compatible. just because SNS are allowed doesn't mean they're intended. I'd be open to applying a patch to enable this behavior if specifically requested (i.e. if some request parameter was present).

        Show
        justinedelson Justin Edelson added a comment - patch isn't backwards compatible. just because SNS are allowed doesn't mean they're intended. I'd be open to applying a patch to enable this behavior if specifically requested (i.e. if some request parameter was present).
        Hide
        jocsch Markus Joschko added a comment -

        The dif

        Show
        jocsch Markus Joschko added a comment - The dif

          People

          • Assignee:
            Unassigned
            Reporter:
            jocsch Markus Joschko
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development