IllegalArgumentException when setting page as its own parent page

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 2.1
    • Affects Version/s: 2.0, 2.0.1, 2.0.2, 2.0.3
    • Component/s: None

      If you perform the steps to set the parent page of a page as itself, the following exception occurs:

      java.lang.IllegalArgumentException: Can not set page as its own parent.
      at com.atlassian.confluence.pages.Page.checkParentValid(Page.java:75)
      at com.atlassian.confluence.pages.Page.setParentPage(Page.java:53)
      at com.atlassian.confluence.pages.Page.addChild(Page.java:125)
      at com.atlassian.confluence.pages.actions.EditPageAction.updateParentPage(EditPageAction.java:240)
      at com.atlassian.confluence.pages.actions.EditPageAction.doSaveEditPageBean(EditPageAction.java:183)
      at com.atlassian.confluence.pages.actions.EditPageAction.doEdit(EditPageAction.java:221)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)

      Steps to reproduce (borrowed from CONF-4940):

      1. start with an existing page
      2. bring up the page update screen
      3. enter the name of the page in the page's parent page field
      4. save ('update')
      5. EXPECT: validation error indicating that a page cannot be its own parent
      6. reenter the name of the page in the parent page field, but this time with a different case
      7. EXPECT: validation error indicating that a page cannot be its own parent

            Assignee:
            Unassigned
            Reporter:
            Jeremy Higgs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: