You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Antonio Sanso <as...@adobe.com> on 2016/12/16 09:56:49 UTC

VanityPath and ResourceResolver#map

hi *,

I would have a question about VanityPath and ResourceResolver#map .
Assuming I have a resource /content/foo/bar with a  vanity path set ti /bar .
AFAICS if I try to do  ResourceResolver#map("/content/foo/bar”) the expectation give by the ResourceResolver#map API would be that this would return “/bar" .
Unfortunately this is not the case . This is still returning "/content/foo/bar” .
It looks like  this mapping mechanism works fine for alias and etc/map but not for vanity path. 
AFAICR this has been like this since the begin (aka no regression) 
My question is this a bug or is by design ?

I hope someone can clarify this…

regards

antonio

Re: VanityPath and ResourceResolver#map

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

> Am 16.12.2016 um 13:22 schrieb Carsten Ziegeler <cz...@apache.org>:
> 
> Justin Edelson wrote
>> Hi,
>> IIUC, this is by design. Vanity paths are intended for inbound use only.
>> 
> 
> Right, they might not be as "stable" as a mapping, e.g /latestnews might
> point to page A now, but to page B in three hours.

Really ? This might be debatable. But I would not remember having used this as a design criteria.

In any case, I just realize it indeed was never the case: We always only created the resolve() mapping but not the map() mapping.


I could have sworn we had support for mapping vanity URLs. Ok, so I stand corrected.

Regards
Felix


> 
> Carsten
> 
> -- 
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
> 


Re: VanityPath and ResourceResolver#map

Posted by Carsten Ziegeler <cz...@apache.org>.
Justin Edelson wrote
> Hi,
> IIUC, this is by design. Vanity paths are intended for inbound use only.
> 

Right, they might not be as "stable" as a mapping, e.g /latestnews might
point to page A now, but to page B in three hours.

Carsten

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org


Re: VanityPath and ResourceResolver#map

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi,
IIUC, this is by design. Vanity paths are intended for inbound use only.

Regards,
Justin
On Fri, Dec 16, 2016 at 4:57 AM Antonio Sanso <as...@adobe.com> wrote:

> hi *,
>
> I would have a question about VanityPath and ResourceResolver#map .
> Assuming I have a resource /content/foo/bar with a  vanity path set ti
> /bar .
> AFAICS if I try to do  ResourceResolver#map("/content/foo/bar”) the
> expectation give by the ResourceResolver#map API would be that this would
> return “/bar" .
> Unfortunately this is not the case . This is still returning
> "/content/foo/bar” .
> It looks like  this mapping mechanism works fine for alias and etc/map but
> not for vanity path.
> AFAICR this has been like this since the begin (aka no regression)
> My question is this a bug or is by design ?
>
> I hope someone can clarify this…
>
> regards
>
> antonio