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

ResourceResolver: different mapping when optimizedAliasResolution enabled

    XMLWordPrintableJSON

Details

    Description

      I found that the there is a different behavior in case the "optimized alias resolution is enabled.

      Setup:

      * /content/jcr:content
        + sling:alias=foobar
      

      In my opinion the expected behavior is that the content resource is aliased and can be resolved via both /content and /foobar. You cannot alias the jcr:content node. Unfortunately there are no unit tests for that, and I just came across that behavior when I tried to write one.

      This works with the "optimized alias resolution" feature turned on, but if it's turned off, it does not work anymore, and you can resolve that resource only via its name. (In that case I assume that the jcr:content resource is aliased.)

      I created https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to demonstrate this problem.

      Is my assumption about the behavior correct?

      Attachments

        Issue Links

          Activity

            People

              joerghoh Joerg Hoh
              joerghoh Joerg Hoh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: