[jira] [Updated] (SLING-12043) Incorrect virtual include path when passing resource to data-sly-resource

2023-09-29 Thread Ben Oeyen (Jira)


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

Ben Oeyen updated SLING-12043:
--
Description: 
When upgrading AEM Service Pack 11 to Service Pack 18 we noticed issues with 
Sling Dynamic include. The virtual include paths contained the resourcetype as 
a postfix to the path where we did not expect that.

We traced it back to the the includeTagFilter.java thinking the resource is 
synthetic in the buildUrl method:
{code:java}
    private String buildUrl(Configuration config, SlingHttpServletRequest 
request) {
        final Resource resource = request.getResource();        
        final boolean synthetic = 
ResourceUtil.isSyntheticResource(request.getResource());
        return UrlBuilder.buildUrl(config.getIncludeSelector(), 
resource.getResourceType(), synthetic, config, request.getRequestPathInfo());
    } {code}
We contacted Adobe Support and they reported that they did make a change in the 
responsivegrid.html in Service Pack 13.

Service pack 11 responsivegrid.html 
{code:java}
...    

... {code}
Was changed in Service pack 13 to:
{code:java}
...         

...  {code}
Because Adobe is not officially supporting Sling Dynamic Includes hence i'm 
creating this ticket. 
-As a temporary workaroud we overlayed the reponsivegrid.html with the SP11 
version to mitigate this issue.- This workaround is causing other issues so 
should not be applied.

*Steps to reproduce this issue:*

1) Install AEM 6.5 with sample content
2) Create a new XF fragment
3) Add an XF component to a page and pick the previously created XF fragment
4) Install Sling Dynamic Include via the OSGI Console
5) Configure Sling Dynamic Include via OSGi Console
{code:java}
Enable = true
resource types = cq/experience-fragments/editor/components/experiencefragment 
{code}
6) Confirm we get a virtual include via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html {code}
{code:java}
...

...
{code}
 7) Do the change from child.path to child.resource via CRX/DE on
{code:java}
/libs/wcm/foundation/components/responsivegrid/responsivegrid.html line 27 
{code}
8) Confirm we get a wrong virtual include path via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html  {code}
{code:java}
...

...
{code}
 

  was:
When upgrading AEM Service Pack 11 to Service Pack 18 we noticed issues with 
Sling Dynamic include. The virtual include paths contained the resourcetype as 
a postfix to the path where we did not expect that.

We traced it back to the the includeTagFilter.java thinking the resource is 
synthetic in the buildUrl method:
{code:java}
    private String buildUrl(Configuration config, SlingHttpServletRequest 
request) {
        final Resource resource = request.getResource();        
        final boolean synthetic = 
ResourceUtil.isSyntheticResource(request.getResource());
        return UrlBuilder.buildUrl(config.getIncludeSelector(), 
resource.getResourceType(), synthetic, config, request.getRequestPathInfo());
    } {code}

We contacted Adobe Support and they reported that they did make a change in the 
responsivegrid.html in Service Pack 13.

Service pack 11 responsivegrid.html 
{code:java}
...    

... {code}
Was changed in Service pack 13 to:
{code:java}
...         

...  {code}

Because Adobe is not officially supporting Sling Dynamic Includes hence i'm 
creating this ticket. As a temporary workaroud we overlayed the 
reponsivegrid.html with the SP11 version to mitigate this issue.

*Steps to reproduce this issue:*

1) Install AEM 6.5 with sample content
2) Create a new XF fragment
3) Add an XF component to a page and pick the previously created XF fragment
4) Install Sling Dynamic Include via the OSGI Console
5) Configure Sling Dynamic Include via OSGi Console
{code:java}
Enable = true
resource types = cq/experience-fragments/editor/components/experiencefragment 
{code}
6) Confirm we get a virtual include via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html {code}
{code:java}
...

...
{code}
 7) Do the change from child.path to child.resource via CRX/DE on
{code:java}
/libs/wcm/foundation/components/responsivegrid/responsivegrid.html line 27 
{code}
8) Confirm we get a wrong virtual include path via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html  {code}
{code:java}
...

...
{code}
 

   Priority: Major  (was: Minor)

Temporary workaround overlaying the responsivegrid.html with the previous 
version is causing other issues in our site, so it is not considered a good 
workaround.

Because of this there is currently no solution to prevent major loss of 

[jira] [Created] (SLING-12043) Incorrect virtual include path when passing resource to data-sly-resource

2023-09-26 Thread Ben Oeyen (Jira)
Ben Oeyen created SLING-12043:
-

 Summary: Incorrect virtual include path when passing resource to 
data-sly-resource
 Key: SLING-12043
 URL: https://issues.apache.org/jira/browse/SLING-12043
 Project: Sling
  Issue Type: Bug
Affects Versions: Dynamic Include 3.3.0
 Environment: Adobe Experience Manager On Premise 6.5 with Service Pack 
13 or higher
Reporter: Ben Oeyen


When upgrading AEM Service Pack 11 to Service Pack 18 we noticed issues with 
Sling Dynamic include. The virtual include paths contained the resourcetype as 
a postfix to the path where we did not expect that.

We traced it back to the the includeTagFilter.java thinking the resource is 
synthetic in the buildUrl method:
{code:java}
    private String buildUrl(Configuration config, SlingHttpServletRequest 
request) {
        final Resource resource = request.getResource();        
        final boolean synthetic = 
ResourceUtil.isSyntheticResource(request.getResource());
        return UrlBuilder.buildUrl(config.getIncludeSelector(), 
resource.getResourceType(), synthetic, config, request.getRequestPathInfo());
    } {code}

We contacted Adobe Support and they reported that they did make a change in the 
responsivegrid.html in Service Pack 13.

Service pack 11 responsivegrid.html 
{code:java}
...    

... {code}
Was changed in Service pack 13 to:
{code:java}
...         

...  {code}

Because Adobe is not officially supporting Sling Dynamic Includes hence i'm 
creating this ticket. As a temporary workaroud we overlayed the 
reponsivegrid.html with the SP11 version to mitigate this issue.

*Steps to reproduce this issue:*

1) Install AEM 6.5 with sample content
2) Create a new XF fragment
3) Add an XF component to a page and pick the previously created XF fragment
4) Install Sling Dynamic Include via the OSGI Console
5) Configure Sling Dynamic Include via OSGi Console
{code:java}
Enable = true
resource types = cq/experience-fragments/editor/components/experiencefragment 
{code}
6) Confirm we get a virtual include via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html {code}
{code:java}
...

...
{code}
 7) Do the change from child.path to child.resource via CRX/DE on
{code:java}
/libs/wcm/foundation/components/responsivegrid/responsivegrid.html line 27 
{code}
8) Confirm we get a wrong virtual include path via curl
{code:java}
curl -u admin:admin -H "Server-Agent: Communique-Dispatcher" 
http://localhost:4502/content/we-retail/language-masters/en.html  {code}
{code:java}
...

...
{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)