You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thorsten Wendelmuth (JIRA)" <ji...@apache.org> on 2012/05/03 01:53:48 UTC

[jira] [Issue Comment Edited] (WICKET-4464) AbstractTransformerBehavior breaks ajax requests in IE8

    [ https://issues.apache.org/jira/browse/WICKET-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267043#comment-13267043 ] 

Thorsten Wendelmuth edited comment on WICKET-4464 at 5/2/12 11:52 PM:
----------------------------------------------------------------------

Couldn't we just take the contentType of the originalResponse if there is any instead of always using the contentType of the page the AbstractTransformBehavior is attached to?
>From my point of view this makes security fixes obsolute because it forces everybody who's still on 1.4.x to either remove all AbstractTransformBehavior-s or stay at version 1.4.19.
                
      was (Author: twendelmuth):
    Couldn't we just take the contentType of the originalResponse if there is any instead of always using the contentType of the page the AbstractTransformBehavior is attached to?
>From my point of view this makes security fixes obsolute because it forces everybody that's still on 1.4.x to either remove all AbstractTransformBehavior-s or stay at version 1.4.19.
                  
> AbstractTransformerBehavior breaks ajax requests in IE8
> -------------------------------------------------------
>
>                 Key: WICKET-4464
>                 URL: https://issues.apache.org/jira/browse/WICKET-4464
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.20
>            Reporter: Robert Keller
>              Labels: Ajax, IE, WICKET-3633
>
> AbstractTransformerBehavior sets ´webResponse.setContentType("text/" + getMarkupType(component) + "; charset=" + encoding);´
> This delegates to the page and in our case usually returns "text/html".
> In ajax-request this overwrites the required setting for ajax "text/xml". If IE8 receives an ajax-response as "text/html" then in wicket-ajax.js:1049 the xmldoc = t.responseXml is null and the error is:
> "ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root <ajax-response> element".
> This error was created by https://issues.apache.org/jira/browse/WICKET-3633.
> Possible un-/fixes:
> - Changing the markuptype on page level to "xml" in ajaxrequests might break functionality.
> + let only AbstractTransformerBehavior consider ajaxrequests and then set xml
> + at least: make org.apache.wicket.markup.html.border.MarkupComponentBorder.getMarkupType(Component) protected and not final!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira