Hi devs,
As you may have seen I've started working again on xwiki-platform-url module (http://jira.xwiki.org/browse/XWIKI-3951) and I now need to add wiki alias support for it. Right now wiki alias support is in oldcore and the url module must not depend on oldcore so I need to extract wiki alias support to a new module. I'm proposing to create a xwiki-platform-wiki module which should contain in the future all modules related to multi wiki handling for stuff not in the model (stuff in the model will go in xwiki-platform-model).
Right now I'm proposing to have:
xwiki-platform-wiki
|_ xwiki-platform-wiki-descriptor
where xwiki-platform-wiki-descriptor will implement description of wikis as xobjects in wiki pages (XWikiServerClass), i.e. what is currently in oldcore's XWiki#findServer.
In the future the idea will be to rewrite xwiki-platform-wiki-manager and to move it to xwiki-platform-wiki/xwiki-platform-wiki-manager for example (or with another name).
WDYT?
Barring negative feedback I'll try to start working on this in the coming week.
Thanks
-Vincent
Hello,
I'm trying to save a document from inside a job [1] execution, as follows
roughly:
xwiki.getXWiki(context).saveDocument(doc, comment, context);
Nothing really special ... It used to work (out of a job), but now it
throws NPE:
<trace>com.xpn.xwiki.XWiki.stripSegmentFromPath(XWiki.java:4725)</trace>
<trace>com.xpn.xwiki.XWiki.getRequestWikiName(XWiki.java:566)</trace>
<trace>com.xpn.xwiki.XWiki.getXWiki(XWiki.java:492)</trace>
<trace>org.xwiki.contrib.mailarchive.internal.persistence.XWikiPersistence.saveAsUser(XWikiPersistence.java:678)</trace>
Checking source code, it happens there (sorry, I roughly decompiled it):
/* 560 */ if ("1".equals(Param("xwiki.virtual.usepath", "1"))) {
/* 561 */ String uri = request.getRequestURI();
/* 562 */ if (LOGGER.isDebugEnabled()) {
/* 563 */ LOGGER.debug("Request uri is: " + uri);
/* */ }
/* */
/* 566 */ uri = stripSegmentFromPath(uri, request.getContextPath());
>From the logs in DEBUG, I see:
"Request uri is: null"
... which is kind of logical I believe, as I'm in a Thread triggered by
another thread, and not directly in an http request.
I'm not sure of what I should do from here ... And if my analysis is
correct, or if something else is wrong. Maybe I should do something with
ExecutionContext ...
Thanks,
BR,
Jeremie
[1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Job+Module