• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • None

      NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.

      Steps to Reproduce

      1. Create a page with name 'abc'
      2. Create other page with name 'page to be moved'
      3. Insert a link to 'page to be moved' on 'abc'
      4. Delete page 'abc'
      5. Create a page with name 'abc' again
        • This operation is successful
      6. Insert a link to 'page to be moved' on 'abc' (optional)
      7. Move 'page to be moved' to somewhere else
        • This operation fails. The below appears in the atlassian-confluence.log
      2014-08-12 10:06:51,870 ERROR [http-bio-8391-exec-507] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.event.events.content.page.PageMoveCompletedEvent[source=page: "Page that is failed to be moved" v.14 (11239782)]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.links.RelatedContentRefactoringListener.handleEvent(com.atlassian.confluence.event.events.content.page.PageMoveCompletedEvent), listener=com.atlassian.confluence.links.RelatedContentRefactoringListener@5f33c0b7}]
       -- url: /confluence/pages/movepage.action | userName: PVanhoof | referer: https://wiki.test.com/confluence/pages/listpages-dirview.action?key=spaceKey&openId=11239782#selectedPageInHierarchy | action: movepage
      java.lang.RuntimeException: A page already exists with the title "Unrelated with the page you want to move" in the space with key spaceKey
          at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
          at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48)
          at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
          at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107)
          at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
          at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
          at com.atlassian.event.legacy.LegacyEventManager.publishEvent(LegacyEventManager.java:36)
          at com.atlassian.confluence.event.ConfluenceEventManager.publishEvent(ConfluenceEventManager.java:47)
          at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
          at com.sun.proxy.$Proxy26.publishEvent(Unknown Source)
          at com.atlassian.confluence.pages.DefaultPageManager.publishPageMoveEvents(DefaultPageManager.java:1150)
          at com.atlassian.confluence.pages.DefaultPageManager.movePageAsChild(DefaultPageManager.java:714)
          ...
      Caused by: com.atlassian.confluence.pages.DuplicateDataRuntimeException: A page already exists with the title "Unrelated with the page you want to move" in the space with key spaceKey
          at com.atlassian.confluence.pages.DefaultPageManager.throwIfDuplicateAbstractPageTitle(DefaultPageManager.java:1067)
          at com.atlassian.confluence.pages.DefaultPageManager.saveContentEntity(DefaultPageManager.java:992)
          at sun.reflect.GeneratedMethodAccessor1554.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
          at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
          at com.atlassian.confluence.util.profiling.ConfluenceMonitoringMethodInterceptor.invoke(ConfluenceMonitoringMethodInterceptor.java:59)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
          at com.sun.proxy.$Proxy59.saveContentEntity(Unknown Source)
          at com.atlassian.confluence.links.DefaultRelatedContentRefactorer.contractAbsoluteReferencesInContent(DefaultRelatedContentRefactorer.java:429)
          at com.atlassian.confluence.links.DefaultRelatedContentRefactorer.contractAbsoluteReferencesInContent(DefaultRelatedContentRefactorer.java:392)
          at com.atlassian.confluence.links.RelatedContentRefactoringListener.handleEvent(RelatedContentRefactoringListener.java:57)
          at sun.reflect.GeneratedMethodAccessor1800.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
          ... 326 more
      

      Workaround

      Option 1:

      1. Change title of the page to be moved.
        i.e. "Release Notes" to "Release Notes v1.0".
      2. Move page to desired location.
        The new title can be changed back to the original after completion.

      Option 2:

      1. Check the error in the logs to find the space that contains the deleted page (this may not be the same space as the page you are moving).
      2. Purge the trash in that space (documentation).
        When the trash is purged, all attachments on purged pages are permanently removed as well.

      Option 3:

      1. Clone the page via Tools > Copy and save the page.
        The title of the page will be "Copy of <page_title>".
      2. Move cloned page to desired location.
        You may rename the title page to the original after moving operation is successful by removing the "Copy of" words from the title.
      3. Delete the old page (can't be moved) to remove redundancies.

            [CONFCLOUD-34649] Page move fails because of a deleted page

            Normand Brousseau added a comment - - edited

            In Confluence v5.5.3, just experienced the same as [Helen Gosper] described on Oct. 07.

            No error message to the user, page tree seems to accept the move, but when the page tree display is refreshed, the page I "moved" is back to its previous location. Then, as an end-user, you feel really lost.

            I had to:

            1. search the atlassian-confluence.log contents to identify the deleted page whose name was duplicate (server admin authorizations needed):
               -- url: /sti-doc-test/pages/movepage.action | userName: bron2001 | referer: https://www.usherbrooke.ca/sti-doc-test/pages/reorderpages.action?key=TECHPC | action: movepage
              java.lang.RuntimeException: A page already exists with the title PCounter - Balance / solde négatif in the space with key TECHPC 
            2. purge the said duplicate from the space trash (space admin authorizations needed)
            3. then the move really worked

            I couldn't find a link between the active (non-deleted) "duplicate" page and the moved pages, since it was not among the moved page's children and no internal link was pointing from the latter to the former. So I'm not clear about what kind of link could cause the problem with deleted pages.

            Normand Brousseau added a comment - - edited In Confluence v5.5.3, just experienced the same as [Helen Gosper] described on Oct. 07. No error message to the user, page tree seems to accept the move, but when the page tree display is refreshed, the page I "moved" is back to its previous location. Then, as an end-user, you feel really lost. I had to: search the atlassian-confluence.log contents to identify the deleted page whose name was duplicate (server admin authorizations needed): -- url: /sti-doc-test/pages/movepage.action | userName: bron2001 | referer: https: //www.usherbrooke.ca/sti-doc-test/pages/reorderpages.action?key=TECHPC | action: movepage java.lang.RuntimeException: A page already exists with the title PCounter - Balance / solde négatif in the space with key TECHPC purge the said duplicate from the space trash (space admin authorizations needed) then the move really worked I couldn't find a link between the active (non-deleted) "duplicate" page and the moved pages, since it was not among the moved page's children and no internal link was pointing from the latter to the former. So I'm not clear about what kind of link could cause the problem with deleted pages.

            qpham@atlassian.com Do the steps to reproduce from Denise allow you to reproduce this issue?

            Steve Haffenden (Inactive) added a comment - qpham@atlassian.com Do the steps to reproduce from Denise allow you to reproduce this issue?

            Thanks for the comment davidrr! I've updated the second workaround to make a note of that.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Thanks for the comment davidrr ! I've updated the second workaround to make a note of that.

            David Yu added a comment -

            None of the workarounds here worked for me. Here's what did:

            Look at the log file. It references a title of a page, and a space that's completely unrelated to the page you're moving. You have to go into that space, and purge the trash of that title that is referenced in the log file.

            David Yu added a comment - None of the workarounds here worked for me. Here's what did: Look at the log file. It references a title of a page, and a space that's completely unrelated to the page you're moving. You have to go into that space, and purge the trash of that title that is referenced in the log file.

            sthr (Inactive) added a comment - - edited

            I keep getting issues when moving pages, I am not sure though of the steps to reproduce as it seems to work sometimes. I think it's indeed related to removing child pages before the parent page is to be moved.

            Workaround 1 and 2 did not work for me.

            Edit. After getting server error messages, the page is finally moved successfully :/

            sthr (Inactive) added a comment - - edited I keep getting issues when moving pages, I am not sure though of the steps to reproduce as it seems to work sometimes. I think it's indeed related to removing child pages before the parent page is to be moved. Workaround 1 and 2 did not work for me. Edit. After getting server error messages, the page is finally moved successfully :/

            JadeA added a comment -

            gvotruong, no this is not true. I actually purged trash pages from both spaces and the error still occurred.

            JadeA added a comment - gvotruong , no this is not true. I actually purged trash pages from both spaces and the error still occurred.

            Giang Vo added a comment -

            As my comment on https://jira.atlassian.com/browse/CONFDEV-27353, "This issue occurs when there is a page which has the same name in trash. Removing that page from trash will let the page be able to move again( EAC page is able to be moved now). So it seems that current "DefaultPageManager"'s behavior of checking duplicate is not correct.". It does not come from my fix of previous bug so I think it is not kind of warranty bug. shaffenden, could you please help to find someone in bug fixing team to working on this?

            Giang Vo added a comment - As my comment on https://jira.atlassian.com/browse/CONFDEV-27353 , "This issue occurs when there is a page which has the same name in trash. Removing that page from trash will let the page be able to move again( EAC page is able to be moved now). So it seems that current "DefaultPageManager"'s behavior of checking duplicate is not correct.". It does not come from my fix of previous bug so I think it is not kind of warranty bug. shaffenden , could you please help to find someone in bug fixing team to working on this?

            JadeA added a comment -

            Hey team,

            For this issue, it would be nice at least if the error message didn't just indicate the pages that are duplicates but linked to the duplicate pages too.

            Though I had an experience with this today where I found all the pages, renamed them but it then displayed the same error message with the updated page names I just changed. So the current error message notification was wrong. To fix this, I had to move all those "duplicate pages" under the parent page I was trying to move. Once I did that, I was able to move the Parent page to a new space.

            JadeA added a comment - Hey team, For this issue, it would be nice at least if the error message didn't just indicate the pages that are duplicates but linked to the duplicate pages too. Though I had an experience with this today where I found all the pages, renamed them but it then displayed the same error message with the updated page names I just changed. So the current error message notification was wrong. To fix this, I had to move all those "duplicate pages" under the parent page I was trying to move. Once I did that, I was able to move the Parent page to a new space.

            I also had this issue but did not receive a 'fail' message. Rather, when I moved via the standard page tree view it appeared to move and upon refresh was back where it started. When I used 'Reorder' it hung up briefly after pressing 'Reorder' button, allowed me to press reorder again but did not move the page.
            We use confluence for technical documentation and I foresee this being a potentially BIG impost on time when updating documentation for a new product release. Even though there is a workaround, if you follow the process recommended by Atlassian for release management, this will occur many times over during the process. Please escalate or revise your documentation to account for this. Thanks.

            Helen Gosper added a comment - I also had this issue but did not receive a 'fail' message. Rather, when I moved via the standard page tree view it appeared to move and upon refresh was back where it started. When I used 'Reorder' it hung up briefly after pressing 'Reorder' button, allowed me to press reorder again but did not move the page. We use confluence for technical documentation and I foresee this being a potentially BIG impost on time when updating documentation for a new product release. Even though there is a workaround, if you follow the process recommended by Atlassian for release management, this will occur many times over during the process. Please escalate or revise your documentation to account for this. Thanks.

              ttranminh Tam Tran
              dunterwurzacher Denise Unterwurzacher [Atlassian] (Inactive)
              Affected customers:
              12 This affects my team
              Watchers:
              33 Start watching this issue

                Created:
                Updated:
                Resolved: