-
Bug
-
Resolution: Won't Fix
-
Medium
-
None
-
2.10.3, 5.3
-
Severity 3 - Minor
-
- View an old version of a page
- Choose "Watch" from the tools menu
- View the current version of that page
- Remove that page
- Go to space admin and purge the trash
- You will get an exception because of a foreign key constraint
The problem here is that purging the trash does not delete notifications on old versions of a page (which should never exist anyway).
Workaround
Backup your database before attempting to perform this! (the following removes all notifications from all deleted pages in the space):
- Identify the SPACEID of the space which you are trying to purge all trash from, via this query:
SELECT * FROM SPACES;
- Use the SPACEID in the following query (this query is applicable to Confluence 5.3 only):
DELETE FROM NOTIFICATIONS WHERE CONTENTID IN (SELECT CONTENTID FROM CONTENT WHERE (CONTENT_STATUS = 'deleted' AND SPACEID = <SPACEID>) OR PREVVER IN (SELECT CONTENTID FROM CONTENT WHERE CONTENT_STATUS = 'deleted' AND SPACEID = <SPACEID>));
- Run the query above, then try to purge the trash again
- is caused by
-
CONFSERVER-15965 While viewing an old version of a page menu items have the old version's page id
- Closed