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

HTL doesn't correctly handle synthetic resource inclusions

    XMLWordPrintableJSON

Details

    Description

      When a synthetic resource is included in a data-sly-resource block element without any resourceType information, the HTL ResourceRuntimeExtension will not correctly dispatch the request. In those cases the request's resource type should be used as a fallback, to identify the correct scripts.

      Example:
      Assuming caller.html:

      <div id="caller" data-sly-resource="${'/content/lorem-ipsum' @ resourceType='syntheticresource'}"></div>
      

      and syntheticresource.html:

      <div id="synthetic-resource">
          <span class="wrapper-text">Testing synthetic resource delegation</span>
          <div class="wrapper" data-sly-resource="${@ selectors='selector'}"></div>
      </div>
      

      results in the selector.html script not being found, due to not taking into consideration the original resource type of the request.

      Attachments

        Activity

          People

            radu Radu Cotescu
            radu Radu Cotescu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h