You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/05/15 12:59:55 UTC

[jira] Created: (SLING-457) script include problem with selectors

script include problem with selectors
-------------------------------------

                 Key: SLING-457
                 URL: https://issues.apache.org/jira/browse/SLING-457
             Project: Sling
          Issue Type: Bug
          Components: ServletResolver
    Affects Versions: 2.0.0
            Reporter: Tobias Bocanegra


i have a base resource type /a with a script /a/foo.html.jsp
then i have a extended resource type /b

when i have content "/xyz" with resourcetype /b, and a request to "/xyz.foo.html" then it works.
but when i have an include <sling:include path="./image.foo.html" resourceType="b"/> it does not. when i specify the base resource type, it works.

it seams like the include resolution does not respect the selectors.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-457) script include problem with selectors

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597087#action_12597087 ] 

Felix Meschberger commented on SLING-457:
-----------------------------------------

Thanks for reporting. I will look into this.

> script include problem with selectors
> -------------------------------------
>
>                 Key: SLING-457
>                 URL: https://issues.apache.org/jira/browse/SLING-457
>             Project: Sling
>          Issue Type: Bug
>          Components: ServletResolver
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>
> i have a base resource type /a with a script /a/foo.html.jsp
> then i have a extended resource type /b
> when i have content "/xyz" with resourcetype /b, and a request to "/xyz.foo.html" then it works.
> but when i have an include <sling:include path="./image.foo.html" resourceType="b"/> it does not. when i specify the base resource type, it works.
> it seams like the include resolution does not respect the selectors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-457) script include problem with selectors

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-457.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

In Rev. 658209 I applied a change to the resource super type resolution. There is now a JcrResourceUtil.getResourceSuperType(Resource) method which is used by the JcrItemResource and the SlingRequestDispatcher.TypeOverwritingResourceWrapper.

See the JavaDoc of the new method for more details on how resource super type resolution works.

Tobias, if the functionality now works as you expected, please close this issue. Thanks.

> script include problem with selectors
> -------------------------------------
>
>                 Key: SLING-457
>                 URL: https://issues.apache.org/jira/browse/SLING-457
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> i have a base resource type /a with a script /a/foo.html.jsp
> then i have a extended resource type /b
> when i have content "/xyz" with resourcetype /b, and a request to "/xyz.foo.html" then it works.
> but when i have an include <sling:include path="./image.foo.html" resourceType="b"/> it does not. when i specify the base resource type, it works.
> it seams like the include resolution does not respect the selectors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-457) script include problem with selectors

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-457:
---------------------------------------

    Assignee: Felix Meschberger

> script include problem with selectors
> -------------------------------------
>
>                 Key: SLING-457
>                 URL: https://issues.apache.org/jira/browse/SLING-457
>             Project: Sling
>          Issue Type: Bug
>          Components: ServletResolver
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>
> i have a base resource type /a with a script /a/foo.html.jsp
> then i have a extended resource type /b
> when i have content "/xyz" with resourcetype /b, and a request to "/xyz.foo.html" then it works.
> but when i have an include <sling:include path="./image.foo.html" resourceType="b"/> it does not. when i specify the base resource type, it works.
> it seams like the include resolution does not respect the selectors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-457) script include problem with selectors

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597390#action_12597390 ] 

Felix Meschberger commented on SLING-457:
-----------------------------------------

By running the testcases committed in Rev. 656974, I was able to reproduce this issue.

The problem was, that the SlingRequestDispatcher uses its own ResourceWrapper implementation overwriting the getResourceType() method. But the getResourceSupertType() was not overwritten, which caused the respective method of wrapped resource to be called. That method, though, relies on the original resource type and thus may result in the wrong resource super type returned.

In Rev. 656972 the resource wrapper implements the getResourceSuperType() method employing the same semantics as used by the JcrItemResource implementation.

Currently, code is still copied. Will implement a better solution preventing code copying.

Implemented the fix in Rev. 656972 and committed the test cases in Rev. 656974.

> script include problem with selectors
> -------------------------------------
>
>                 Key: SLING-457
>                 URL: https://issues.apache.org/jira/browse/SLING-457
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: 2.0.0
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>
> i have a base resource type /a with a script /a/foo.html.jsp
> then i have a extended resource type /b
> when i have content "/xyz" with resourcetype /b, and a request to "/xyz.foo.html" then it works.
> but when i have an include <sling:include path="./image.foo.html" resourceType="b"/> it does not. when i specify the base resource type, it works.
> it seams like the include resolution does not respect the selectors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.