[ 
https://issues.apache.org/jira/browse/SLING-9337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Fortuna updated SLING-9337:
-------------------------------
     Attachment: image-2020-04-07-09-17-32-399.png
    Description: 
I'd like to use Sling aliases to reference the current content as follows (node 
is /content/wnews/articles/2020):
{code:java}
{
  "jcr:primaryType": "nt:unstructured",
  "title": "Articles (2020)",
  "sling:alias": "current",
  "pageSize": 7,
  "sling:resourceType": "wnews/page/article-list"
} {code}
So for example, the following URLs should both work:
 * [http://example.com/content/wnews/articles/2020.html]
 * [http://example.com/content/wnews/articles/current.html]

I've discovered that the "current" url doesn't resolved unless I disable alias 
caching in the Resource Resolver Factory:

  !image-2020-04-07-09-17-32-399.png!

 

I'm pretty sure this isn't a good workaround, especially as it causes other 
issues with redirects of URLs with no extension.

Any other possible reasons why this isn't working?

Other refs:
 * 
[https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-resource-alias-caching/qaq-p/169480]

 

  was:
I'd like to use Sling aliases to reference the current content as follows (node 
is /content/wnews/articles/2020):
{code:java}
{
  "jcr:primaryType": "nt:unstructured",
  "title": "Articles (2020)",
  "sling:alias": "current",
  "pageSize": 7,
  "sling:resourceType": "wnews/page/article-list"
} {code}
So for example, the following URLs should both work:
 * [http://example.com/content/wnews/articles/2020.html]
 * [http://example.com/content/wnews/articles/current.html]

I've discovered that the "current" url doesn't resolved unless I disable alias 
caching in the Resource Resolver Factory:

 

 

I'm pretty sure this isn't a good workaround, especially as it causes other 
issues with redirects of URLs with no extension.

Any other possible reasons why this isn't working?

Other refs:
 * 
[https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-resource-alias-caching/qaq-p/169480]

 


> sling:alias not working when alias caching enabled
> --------------------------------------------------
>
>                 Key: SLING-9337
>                 URL: https://issues.apache.org/jira/browse/SLING-9337
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>            Reporter: Ben Fortuna
>            Priority: Major
>         Attachments: image-2020-04-07-09-17-32-399.png
>
>
> I'd like to use Sling aliases to reference the current content as follows 
> (node is /content/wnews/articles/2020):
> {code:java}
> {
>   "jcr:primaryType": "nt:unstructured",
>   "title": "Articles (2020)",
>   "sling:alias": "current",
>   "pageSize": 7,
>   "sling:resourceType": "wnews/page/article-list"
> } {code}
> So for example, the following URLs should both work:
>  * [http://example.com/content/wnews/articles/2020.html]
>  * [http://example.com/content/wnews/articles/current.html]
> I've discovered that the "current" url doesn't resolved unless I disable 
> alias caching in the Resource Resolver Factory:
>   !image-2020-04-07-09-17-32-399.png!
>  
> I'm pretty sure this isn't a good workaround, especially as it causes other 
> issues with redirects of URLs with no extension.
> Any other possible reasons why this isn't working?
> Other refs:
>  * 
> [https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-resource-alias-caching/qaq-p/169480]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to