On Jul 31, 2013, at 8:03 PM, Vincent Massol <[email protected]> wrote:
Hi guys,
On Jul 29, 2013, at 11:21 AM, Marius Dumitru Florea <[email protected]> wrote:
On Mon, Jul 29, 2013 at 12:08 PM, Christian Meunier <[email protected]> wrote:
Hi All,
I sent 2 emails to the users list without much success and I am hoping that I might find a more suitable audience for my somewhat technical issues with the devs.
1) Global users in sub wiki.
In the system I am trying to setup, all the users are created using a custom auth module in the main wiki (Global users), so there will be no local users. The issue is that on a sub wiki, when you click on a user to bring up its profile, you end up on a document not found.
From the auth module, the principal returned is prefixed with the 'XWiki.' so the system should be able to differentiate between local and global users and act accordingly.
'XWiki' is the space name, and you have this space both in the local and the global wiki. In order to make sure the user is from the global wiki you need to use the full/absolute user reference: wiki:XWiki.userName. So your auth module should return something like xwiki:XWIki.mflorea, where 'xwiki' is the main wiki, and 'mflorea' is the user alias used to login. On the Java side you should use the DocumentReference and the DocumentReferenceSerializer.
I checked that I could reproduce the issue even if i am not using any custom authentication.
Should i log this as a bug in Jira ?
2) Empty servlet path support
The second thing I am struggling with is shortening the urls. I am following this guide:
But no matter what I try, I cannot make it work without the '/bin/ prefix. Please note that the xwiki is running under Jetty as the main context (mapped as '/') so the url I have is: server.com/WebHome which according to the short urls document should work.
it appears that the issue comes from StandardXWikiURLFactory: -------------------- String type = extendedURL.getSegments().get(0); if (type.equals("bin") || type.equals(this.configuration.getWikiPathPrefix())) { xwikiURL = this.entityURLFactory.createURL(extendedURL, parameters); } else { throw new UnsupportedURLException(String.format("URL type [%s] are not yet supported!", type)); } ----------------
What version of XWiki are you using? I think some changes have been made to the URL "parsing" code in 5.1. Vincent, WDYT?
Yes I made a lot of changes to use the new platform-url module. However this module doesn't support short URLs indeed so I broke support for short urls… :(
I'll work on fixing it for 5.1.x and 5.2.
I've created http://jira.xwiki.org/browse/XWIKI-9376 Thanks -Vincent
Sorry about that. -Vincent
Thanks, Marius
So basically for server.com/WebHome, what is happening is that type above equals to "WebHome" and so the condition obviously fails and throws the UnsupportedURLException. Given the above code, I am either forgetting something in the xwiki.cfg or it simply cannot work out of the box...
If i were to provide my own custom XWikiUrlFactory, would it solve entirely the issue or some other parts of the system will nevertheless fails because they have the same assumption regarding the presence of the bin or the PathPrefix in the url ?
Thanks in advance for your help !
-- Chris