Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9337

sling:alias not working when alias caching enabled

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ResourceResolver
    • Labels:
      None

      Description

      I'd like to use Sling aliases to reference the current content as follows (node is /content/wnews/articles/2020):

      {
        "jcr:primaryType": "nt:unstructured",
        "title": "Articles (2020)",
        "sling:alias": "current",
        "pageSize": 7,
        "sling:resourceType": "wnews/page/article-list"
      } 

      So for example, the following URLs should both work:

      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:

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fortuna Ben Fortuna
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: