> On 29 Mar 2016, at 16:46, Sergiu Dumitriu <[email protected]> wrote:
> 
> It is working, but only if the default action is missing as well. So
> indeed /bin/view/Page doesn't work ('view' is considered the space), but
> /bin/Page does work. And as far as I know, it always worked this way.

Ok, thanks for remembering this! So only when xwiki.showviewaction=0

> When not considering nested spaces, I'm -0 for its removal, it's a
> setting that's useful for shorter URLs in a mostly read only site (e.g.
> public website).

Only if you put your documents in the Main space… If you need short URLs it’s 
better to use a shorturl strategy as described at 
http://platform.xwiki.org/xwiki/bin/view/Main/ShortURLs (notice that 
xwiki.usedefaultweb is not even mentioned there).

> I don't have a clear grasp of how nested spaces work,
> so I'm not sure how this setting affects nested spaces.

I’ll do some tests but I’m pretty sure that the combination of 
xwiki.showviewaction=1 + xwiki.usedefaultweb=1 + Nested Pages is not currently 
working.

Thanks
-Vincent

> On 03/29/2016 09:35 AM, Vincent Massol wrote:
>> Hi devs,
>> 
>> I was reading the comment from Marius on 
>> https://jira.xwiki.org/browse/XWIKI-13223 and indeed it seems that the 
>> “xwiki.usedefaultweb” config parameter has not been working for a very long 
>> time (Marius says at least before 2.7). Locally I’ve tested a 5.2.4 version 
>> and indeed it’s not working.
>> 
>> For Main.AllDocs the generated URL is:
>> http://localhost:8080/xwiki/bin/view/AllDocs
>> 
>> Maybe at some point we were counting the number of path segments after the 
>> action and if it was 1 and xwiki.usedefaultweb was set to true we would add 
>> “Main” as the space. 
>> 
>> However that’s not the case in XWiki 5.2.4 and probably earlier.
>> 
>> In addition, with Nested Pages we’ve implemented the support of a single 
>> path element after the action. FTR, from 
>> BinEntityResourceReferenceResolverTest:
>> 
>> // Test when single space segment, to be Nested Document friendly.
>> // Normally the last segment is always the page name but we want to handle a 
>> special case when we
>> // have "/view/something" and we wish in this case to consider that 
>> "something" is the space. This
>> // is to handle Nested Documents, so that the user can have a top level 
>> Nested Document
>> // (something.WebHome) and access it from /view/something. If we didn't 
>> handle this special case
>> // the user would get Main.something and thus wouldn't be able to access 
>> something.WebHome. He'd
>> // need to use /view/something/ which is not natural in the Nested Document 
>> mode.
>> testCreateResource("http://localhost/bin/space";, "view",
>>    buildEntityReference("wiki", Arrays.asList("space"), null), 
>> fullSingleSpaceReference, EntityType.DOCUMENT);
>> 
>> I also don’t think it’s a big help for users to be able to omit the Main 
>> space since they need to keep the other spaces in the URL anyway.
>> 
>> So I’m proposing to officially drop support for this parameter and remove it 
>> from xwiki.cfg since it has not worked for ages.
>> 
>> WDYT? Have I missed something?
>> 
>> Thanks
>> -Vincent
>> 
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>> 
> 
> 
> -- 
> Sergiu Dumitriu
> http://purl.org/net/sergiu
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to