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

Werner Punz edited comment on MYFACES-4685 at 10/27/24 6:58 PM:
----------------------------------------------------------------

I am trying to reproduce the issue here, but it works for me on chrome and 
firefox and safari on the mac! NewBodyData is set and has a value, the xhr 
request passes without any errors!

Which browser, which platform? If this issue was triggered was by an automated 
test framework then the problem is on the framework side! 

PS I assume it is the all keyword tests because those are the only ones which 
trigger a replace body!

 


was (Author: werpu):
I am trying to reproduce the issue here, but it works for me on chrome and 
firefox and safari on the mac! NewBodyData is set and has a value, the xhr 
request passes without any errors!

Which browser, which platform? If this was by an automated test framework then 
the problem is in the framework side!

PS I assume it is the all keyword tests because those are the only ones which 
trigger a replace body!

 

> TypeError: newBodyData is undefined
> -----------------------------------
>
>                 Key: MYFACES-4685
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4685
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.3.11
>            Reporter: Volodymyr Siedlecki
>            Assignee: Werner Punz
>            Priority: Major
>         Attachments: jsf_ajax_keyword_web.war
>
>
>  
> The variable newBodyData is undefined in the current JSF 2.3 snapshot. This 
> is reproducible via the jsf_ajax_keyword_web.war (attached).  Please set the 
> project stage to development.
> The issue seems to be that the quirks/_AjaxResponseQuirks.js's _replaceBody 
> method is used instead of the xhrCore/_AjaxResponse.js's code.
> Head data is pulled, and the passed into _replaceBody.
>  
> {code:java}
>  var parsedData = this._replaceHead(request, context, cDataBlock);
>                     ('undefined' != typeof parsedData && null != parsedData) 
> ? this._replaceBody(request, context, cDataBlock, parsedData) : 
> this._replaceBody(request, context, cDataBlock);
> {code}
>  
> Then the head data is selected (3rd arg):
> {code:java}
>  doc = (arguments.length > 3) ? arguments[3] : _Lang.parseXML(newData);{code}
> Then leads to the problem that no body element exists when it's extracted 
> next, leaving it to be undefined:
> {code:java}
> var newBodyData = doc.getElementsByTagName("body")[0];{code}
> See stack trace here:
> {noformat}
>  TypeError: newBodyData is undefined
> _replaceBody 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:8803
>  
> processUpdate 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:8273
>  
> processChanges 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:8215
>  
> processResponse 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:7905
>  
> response 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:10043
>  
> response 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:10523
>  
> onsuccess 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:7447
>  
> hitch 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:2408
>  
> mixMaps 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:2439
>  
> send 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:7349
>  
> enqueue 
> http://localhost:9080/jsf_ajax_keyword_web/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development:6152
>   {noformat}



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

Reply via email to