Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
4.5.2, 5.0-milestone-2, 5.0.1
-
None
-
Unknown
-
N/A
-
N/A
-
Description
The document returned by XWikiContext#getWikiServer() must came from the main wiki, and currently came from the subwiki, which is a serious regression.
Moreover, the method is marked deprecated, and I do not see a replacement. The comment says the following which has absolutely not the same usage:
@deprecated use {@link XWiki#getWikiOwner(String, XWikiContext)} instead
My current (lengthy) workaround in velocity is:
#set( $serverDoc = $xwiki.getDocument("xwiki:${context.Context.getWikiServer().fullName}").getDocument() )
Attachments
Issue Links
- is related to
-
XWIKI-8952 XWiki#getWikiOwner can potentially return wrong value for main wiki
- Closed