You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2011/09/09 17:35:09 UTC

[jira] [Created] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
------------------------------------------------------------------------------------------------------------------

                 Key: WICKET-4038
                 URL: https://issues.apache.org/jira/browse/WICKET-4038
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5-RC7
            Reporter: Andrea Del Bene


With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:

       " This XML file does not appear to have any style information associated with it. The document tree is shown below.
      <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "

The error message is the same for Firefox and Chromium.
See attached quickstart.

Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102084#comment-13102084 ] 

Andrea Del Bene commented on WICKET-4038:
-----------------------------------------

Hi Pedro,

your patch solve problem and is conceptually right, but it breaks 4 test cases:
-InternalErrorCallsAjaxOnFailureTest
-PageProviderTest
-PageVersioningTest
-MultiRequestCycleListenerCallOrderTest

Why not simply remove ajax parameters directly inside MountedMapper (see attached patch)? 


> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>         Attachments: WICKET-4038.patch, issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101279#comment-13101279 ] 

Andrea Del Bene commented on WICKET-4038:
-----------------------------------------

To run quickstart click on "Show results" and then on a link below.

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>         Attachments: issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

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

Martin Grigorov resolved WICKET-4038.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.1

I like Pedro's approach. I'm just not sure whether something else can break. That's why I put the check in UrlInfo to prevent the leakage of Ajax related parameters in the produced Urls.

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>            Assignee: Martin Grigorov
>             Fix For: 1.5.1
>
>         Attachments: WICKET-4038.patch, ajaxParametersCopyFix.txt, issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Del Bene updated WICKET-4038:
------------------------------------

    Attachment: ajaxParametersCopyFix.txt

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>         Attachments: WICKET-4038.patch, ajaxParametersCopyFix.txt, issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Del Bene updated WICKET-4038:
------------------------------------

    Attachment: issue.zip

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>         Attachments: issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Assigned] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

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

Martin Grigorov reassigned WICKET-4038:
---------------------------------------

    Assignee: Martin Grigorov

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>            Assignee: Martin Grigorov
>         Attachments: WICKET-4038.patch, ajaxParametersCopyFix.txt, issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (WICKET-4038) MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl

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

Pedro Santos updated WICKET-4038:
---------------------------------

    Attachment: WICKET-4038.patch

My first impression debugging the quickstart is that all request parameters encoded to carry framework specific information should not be propagated across all the request cycle after get consumed by framework internals.
Goes attached a patch with this solution.

A simpler solution would be:
1 - tweak AbstractMapper to not encode internal flags in the URL. At encodePageParameters method for instance.
2 - simple not add them to PageParameter objects.

I don't know which is the best alternative of those.

> MountedMapper.mapHandler ruins Links inside mounted pages appending parameters wicket-ajax and wicket-ajax-baseurl
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4038
>                 URL: https://issues.apache.org/jira/browse/WICKET-4038
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Andrea Del Bene
>         Attachments: WICKET-4038.patch, issue.zip
>
>
> With the last commit n° 1166194 method mapHandler has been added to MountedMapper class in order to solve WICKET-4014. Unfortunately this method seems to ruin Link url inside mounted page (for example home page) if this page uses AJAX.
> mapHandler modifies Link url appending parameters 'wicket-ajax' and 'wicket-ajax-baseur'l to it. In this way when we click Link we get an error from browser like this:
>        " This XML file does not appear to have any style information associated with it. The document tree is shown below.
>       <ajax-response><redirect>wicket/page?41</redirect></ajax-response> "
> The error message is the same for Firefox and Chromium.
> See attached quickstart.
> Warning: as I'm writing this issue, Wicket snapshot is not affected yet by this bug, so you have to run quickstart with the last source from repository.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira