Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.2 M1, 1.1.2
-
None
Description
At plugin init time XWiki.database is not initialised so all context.getWiki().getDatabase() will return null in place of the main wiki name as it sould. So actually it's impossible to retrieve a document from database at plugin init time because rights check (that use it to get the name of the main wiki) crash.
Anyway, to get the main wiki name context.getMainXWiki() should be preferred.