You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kevin Menard (JIRA)" <de...@tapestry.apache.org> on 2008/01/09 17:38:34 UTC

[jira] Created: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

TAPESTRY-1502 breaks non-root contexts.
---------------------------------------

                 Key: TAPESTRY-2033
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.8
            Reporter: Kevin Menard


TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.

In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.

The generated URLs are all of the form: 

<script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>

As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557356#action_12557356 ] 

Kevin Menard commented on TAPESTRY-2033:
----------------------------------------

Bah.  That induces a test failure.  I missed it because I still have pending changes in my local checkout.

I'll get a new patch that either fixes the failing test or fixes the approach taken.

> TAPESTRY-1502 breaks non-root contexts.
> ---------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Menard updated TAPESTRY-2033:
-----------------------------------

    Attachment: TAPESTRY-2033.patch

This code removes a "-1" check.  Presumably this code was in there in order to prevent an AIOOB exception, but the rest of the code makes that impossible anyway.

The problem, using the example above, is that I would have the following:

requestTerms[0] == ""
requestTerms[1] == "manager"

pathTerms[0] == ""
pathTerms[1] == "manager"
pathTerms[2] == "assets"
.
.
.

The first path through the loop would detect that "" was duplicated, but the second pass would not detect that "manager" was duplicated because the first conditional short-circuited the whole loop  (i == 1;   requestTerms.length = 2 - 1 == 1)

Making this change fixed my app.  Relative URLs seem to work throughout with "../" being added as appropriate.

> TAPESTRY-1502 breaks non-root contexts.
> ---------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557333#action_12557333 ] 

Kevin Menard commented on TAPESTRY-2033:
----------------------------------------

Looks like it's an off-by-one error.  I'll prepare a patch.

> TAPESTRY-1502 breaks non-root contexts.
> ---------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2033) Optimized requests paths are broken for root paths within contexts

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-2033:
-------------------------------------------

    Summary: Optimized requests paths are broken for root paths within contexts  (was: TAPESTRY-1502 breaks non-root contexts.)

> Optimized requests paths are broken for root paths within contexts
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.8
>
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-2033) Optimized requests paths are broken for root paths within contexts

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2033.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.8

> Optimized requests paths are broken for root paths within contexts
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.8
>
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-2033:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> TAPESTRY-1502 breaks non-root contexts.
> ---------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>            Assignee: Howard M. Lewis Ship
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2033) TAPESTRY-1502 breaks non-root contexts.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557420#action_12557420 ] 

Howard M. Lewis Ship commented on TAPESTRY-2033:
------------------------------------------------

I discoverred a flaw in the unit tests along the way.  I have the fix just about together.

> TAPESTRY-1502 breaks non-root contexts.
> ---------------------------------------
>
>                 Key: TAPESTRY-2033
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2033
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.8
>            Reporter: Kevin Menard
>            Assignee: Howard M. Lewis Ship
>         Attachments: TAPESTRY-2033.patch
>
>
> TAPESTRY-1502 changed the way that URLs were generated.  The comments on the issue indicate it works great for a non-root context, but my experience is indicating otherwise.  It is possible I've done something wrong, but without changing a single line of code, all of my pagelinks, actionlinks, includescripts, includestylesheets, and so forth have broken.
> In this case, I have my app mapped to the "/manager" context.  I access it locally via http://localhost:8080/manager/.
> The generated URLs are all of the form: 
> <script src="manager/assets/scriptaculous/prototype.js" type="text/javascript"></script>
> As you can see, the context is being included in the path but done so relatively.  The above would resolve to http://localhost:8080/manager/manager/assets/scriptaculous/prototype.js, which is incorrect.  It should be http://localhost:8080/manager/assets/scriptaculous/prototype.js

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org