Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
5.0.3
-
None
-
Unknown
-
Description
To reproduce:
1. Create a page with some text in XWiki.Template
$xwiki.copyDocument('XWiki.Template',"Test.WebHome")
2. try to delete the page
#set ($document = $xwiki.getDocument('XWiki.Template')) $document.delete()
See now that the page has been deleted successfully.
3. Now, translate XWiki.Template in another language (multi-language mode enabled), then copy it and try to delete it again.
The document still remains in the document index, and in database, in the 2nd language. Only the "default language" version of the page has been deleted, putting the page in an inconsistant state.
There, there's no other way to delete this dangling document than deleting the whole space, or deleting it directly from the DB. Maybe it's possible to avoid this kind of state, since a lot of scripts are using $doc.delete() ?