VanityPath and ResourceResolver#map

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VanityPath and ResourceResolver#map

Antonio Sanso
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
Reply | Threaded
Open this post in threaded view
|

Re: VanityPath and ResourceResolver#map

justzzzz
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: VanityPath and ResourceResolver#map

Carsten Ziegeler
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
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: VanityPath and ResourceResolver#map

Felix Meschberger-3
Hi

> Am 16.12.2016 um 13:22 schrieb Carsten Ziegeler <[hidden email]>:
>
> 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
> [hidden email]
>