Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3883

Same-Name Sibling possible when moving page in admincentral

XMLWordPrintable

      Steps to reproduce:

      1) Create two pages, "parent1" and "parent2"
      2) Create two subpages in each, "subpage1" and "subpage2"
      3) Move "parent2/subpage2" BETWEEN "parent1/subpage1" and "parent1/subpage2"

      "parent1" now has two pages named "subpage2", which causes various other problems.

      I traced this down to a queer bit of logic in magnolia-module-admininterface/.../AdminTreeMVCHandler.java.

      In the pasteNode() method, in the section pertaining to PASTETYPE_ABOVE and PASTETYPE_BELOW, it decides to do an end run around the copyMoveNode() method ONLY when moving, and ONLY when the pastetype is above or below.

      For instance, if you were to replace step 3 above with:
      3) Move "parent2/subpage2" onto "parent1"

      In that case, copyMoveNode() would be used and everything would work fine.

      From browsing the SVN changelog, this behavior has apparently been in place since at least 2006.

      I've included a patch file (against trunk) with the recommended fix.

        Acceptance criteria

              ochytil Ondrej Chytil
              nwing Nickolaus Wing
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD