Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-447

Can't add child page with the same name as another parent's sibling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 6.2.9
    • 6.2.8
    • None
    • None

    Description

      Steps to reproduce

      1.  Create a parent page
      2.  Create a child page called child
      3.  Create a child page called another-child
      4.  Select the page another-child and try to create a page called child

      Expected results

      The page is created

      Actual results

      The page is not created because the NodeValidator returns an error indicating the page already exists (tho it doesn't)

      Workaround

      N/A

      Development notes

      At info.magnolia.ui.editor.validator.NodeNameFieldValidatorFactory.createValidator() method, the isFailure method is checking if the page you want to create already exists on the parent path instead of checking within the same level.

      Please check the attachments. item-value.png shows the path within the new node is going to be created (/parent/another-child). The new node is going to be called child.

      As you can check in the pages structure, there is a child node called child and another child called another-child, so the path parent/another-child/child should be available.

      Anyways, the validator checks if a path like /parent/child exists, tho this is not the path that is going to be created (check path-value.png image).

      The validator fails tho the page path is available (check error.png image).

      Checklists

        Acceptance criteria

        Attachments

          1. error.png
            error.png
            215 kB
          2. item-value.png
            item-value.png
            210 kB
          3. path-value.png
            path-value.png
            221 kB

          Issue Links

            Activity

              People

                mhaderka Martin Haderka
                ccantalapiedra Carlos Cantalapiedra
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD