DuplicateDataRuntimeException when publishing to same space
Description
Environment
None
Activity
Show:
Details
Details
Assignee
Unassigned
UnassignedReporter
Sync User [K15t]
Sync User [K15t]Components
Backbone Issue Sync
Backbone Issue Sync
Created May 13, 2015 at 12:18 PM
Updated March 17, 2023 at 2:03 PM
When publishing an unresolved change (removed or not available in variant) we change the permalink of the masterpage to the unresolved pages Scroll Title. If a page with this title already exist the following exception is thrown.
Page 'FallbackChange{resolvedChange=DefaultChange{confluencePage=page: .page v1.0 (34144889), scrollPageTitle='page', scrollPageKey='null', changeType=Remove, version=DefaultVersion{name='1.0', versionId='7F0000010144DBD1343F906C3F6C6E6A', archived=false, spaceKey='test}}}' could not be published.Reason: com.atlassian.confluence.pages.DuplicateDataRuntimeException: A page already exists with the title page in the space with key TEST
To reproduce
Setup space with versions enabled
create page 'page1'
create a page 'page2'
change Scroll Title of 'page2' in version 1.0 to 'page1'
publish to same
delete 'page1' (former 'page2') in version 1.0
publish to same
:cross_mark: DuplicateDataRuntimeException
Workaround
Change permalink of original 'page1' in currently published