-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.12.0, 8.5.18
-
None
-
3
-
Severity 3 - Minor
-
Issue Summary
Moving page with incoming link from another page that has duplicated title in the same space failed without proper error in UI
Steps to Reproduce
- Install Confluence
- Create a new Space with few pages named like below:
- Child 1
- Child 1
- Child 3
Note that Confluence Server/Data Center does not allow pages with duplicated names exist in the same space. However, situations like this can be found in some customers' environments where we're still not sure how it happened. For the purpose of replicating this bug, the above pages with a duplicated title are achieved via database modification.
- Make sure either of the duplicated page is linked to Child 3 so it appears as "Incoming Link" in Child 3's Page Information
- Move Child 3 to another space
Expected Results
- The page is moved successfully to the new space (since the page with duplicated page title is not part of the move)
OR - The page move failed with a clear error message (eg: a page with the same title already existed)
Error messages in the log were able to show this, but only admin with access to the logs are able to find it out
Actual Results
The page has failed to move and "Page Not Found" error is shown in the UI. It is confusing to the user who triggers the page move because they won't understand if it has failed or why it has failed.
Error message below can be found in atlassian-confluence.log
2021-10-25 15:12:19,735 ERROR [Long running task: Move Page] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.event.events.content.page.PageMoveEvent@7016d192[theMover=ConfluenceUserImpl{name='admin', key=ff8080817c7bc8fb017c7bc9d0130000},oldSpace=Space{key='CO'},oldParentPage=page: Parent Page v.1 (983045),oldPosition=<null>,movedBecauseOfParent=false,movedPageList=[page: Child 3 v.1 (983051)],page=page: Child 3 v.1 (983051),suppressNotifications=false,timestamp=1635135139607]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.links.RelatedContentRefactoringListener.handleEvent(com.atlassian.confluence.event.events.content.page.PageMoveEvent), listener=com.atlassian.confluence.links.RelatedContentRefactoringListener@6bfbf2e0} (timed)] -- referer: http://localhost:27120/c7120/display/CO/Child+3 | url: /c7120/pages/movepage.action | traceId: 007f94c4f2adf7c7 | userName: admin | action: movepage java.lang.RuntimeException: A page already exists with the title Child 1 in the space with key CO. Listener: com.atlassian.confluence.links.RelatedContentRefactoringListener event: com.atlassian.confluence.event.events.content.page.PageMoveEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57) at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimedListenerInvoker.invoke(ConfluenceListenerHandlersConfiguration.java:96) at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory$1.lambda$run$0(ConfluenceEventDispatcher.java:93) at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50) ... Caused by: com.atlassian.confluence.pages.DuplicateDataRuntimeException: A page already exists with the title Child 1 in the space with key CO at com.atlassian.confluence.pages.DefaultPageManager.throwIfDuplicateAbstractPageTitle(DefaultPageManager.java:1760) at com.atlassian.confluence.pages.DefaultPageManager.saveContentEntity(DefaultPageManager.java:1532) ...
Information
Confluence Cloud allows pages having the same title to exist in the same space. An XML Export from Confluence Cloud could have caused this.
Workaround
Look into the log to identify the duplicate page title and rename either of the page.