You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Ben Fortuna (Jira)" <ji...@apache.org> on 2020/04/06 23:18:00 UTC
[jira] [Created] (SLING-9337) sling:alias not working when alias
caching enabled
Ben Fortuna created SLING-9337:
----------------------------------
Summary: 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
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:
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)