> On 29 Mar 2016, at 16:53, Vincent Massol <vincent(a)massol.net> wrote:
>
>
>> On 29 Mar 2016, at 16:46, Sergiu Dumitriu <sergiu(a)xwiki.org> 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.
So indeed this got broken in 7.2M1 when we refactored URL parsing for Nested Spaces/Pages
(XWIKI-12169).
The problem is that this conflicts with the strategy we’ve used to access top level
Nested Pages. In the URL parsing code we have:
// 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.
So right now when we see /bin/view/something or /bin/something, we consider “something”
to be the space name and the page is “WebHome”.
So this conflicts with the previous behavior of xwiki.usedefaultweb=1 &
xwiki.showviewaction=0
We need to decide what we want. I personally prefer removing xwiki.usedefaultweb which
was already strange (since it worked only with xwiki.showviewaction and only shortens
URLs if the doc is in the Main space) and keep the ability to access top-level Nested
Documents easily.
WDYT?
Sounds good, +1. There was an old issue, debating whether /bin/Something
should resolve to Something.WebHome or Main.Something, and the popular
opinion was Something.WebHome, so it's good that this was finally solved.