Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.3-milestone-1
-
delete document virtual multiwiki
-
Unknown
-
N/A
-
N/A
-
Description
XWikiCacheStore.deleteXWikiDoc(XWikiDocument doc, XWikiContext context) uses internally getKey(doc, context) instead of simply getKey(doc).
The getKey(doc, context) method ignores the document's wiki and uses the context wiki instead. This causes a api.Document.delete() call from velocity (or an XWiki.deleteDocument(...) from java) to delete the wrong document (from the current wiki) if the document to delete is from a different wiki (in a multiwiki environment). Example: someWiki:XWiki.Admin.delete() results in deleting currentWiki:XWiki.Admin.
A workaround is to change the context database before a delete document call.
Note: Marked as Critical since it can cause data loss by deleting the wrong pages.
Attachments
Issue Links
- is duplicated by
-
XWIKI-8102 Install + Uninstall on farm does not uninstall extension from subwikis
- Closed