-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 8.5.4, 8.7.1, 8.5.10, 8.5.17, 9.2.4
-
Component/s: Space - Export / Import
-
None
-
22
-
Severity 3 - Minor
-
11
Issue Summary
Unable to delete spaces imported from Confluence Cloud if that space contained Archived pages
This is reproducible on Data Center: (yes)
Steps to Reproduce
- On Confluence Cloud, create a Space with a few pages
- Archived one of those pages
- Export this space as full space XML export
- Import this space into Confluence Data Center
- Attempt to delete this Space from Confluence Data Center
Expected Results
Space gets deleted
Actual Results
Space deletion fails in WebUI
The following exception in atlassian-confluence.log
SpaceID we are trying to delete in this example is 1736706
ERROR [Long running task: Space removal long running task] [atlassian.confluence.spaces.DefaultSpaceManager] removeSpace Cannot remove space: ISTS -- referer: https://confluence.com/spaces/removespace.action?key=ISTS | traceId: 9b98bf1138acbbbf | userName: admin | action: doremovespace | url: /spaces/doremovespace.action | space: 1736706 org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [fklmweu06nft59g7mw1i1myorys]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "spaces" violates foreign key constraint "fklmweu06nft59g7mw1i1myorys" on table "content" Detail: Key (spaceid)=(1736706) is still referenced from table "content".
Looking for any content related to the spaceid you are attempting to delete will return archived pages and other related content to them (drafts, attachments, plugin data)
select contentid, contenttype, prevver, content_status, spaceid from content where spaceid=1736706;

Workaround
Space leftover data needs to be manually deleted from the database following How to Manually Delete a Space KB
To prevent this issue:
- Unarchive all pages in Space you intend to import into Confluence DC
- Delete any archived pages on the space and purge the trash before generating export on cloud
- is caused by
-
CONFSERVER-59721 Archived pages are not accessible when you import a space exported from Cloud
-
- Gathering Impact
-