Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.3.0.GA_P01, 4.0.BETA
-
Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:HideICEfaces4 trunk rev. 40066
Browsers: all
Server: Tomcat7
Test application: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/ICE-9440ShowICEfaces4 trunk rev. 40066 Browsers: all Server: Tomcat7 Test application: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/ICE-9440
-
Assignee Priority:P1
Description
A JS error occurs in FF/IE when uploading files using the h:inputFile component; in Firefox27 the file seems to be uploaded (although the JS error is visible in the console); in Chrome32 or IE10 the file does not appear to be uploaded, and its length is not rendered on page.
The error message in FF27:
TypeError: e is undefined
http://localhost:8080/ICE-9440/javax.faces.resource/bridge.js.jsf?ln=ice.core&v=4_0_0_140224
Line 32
These issues can be reproduced using the test app from: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/ICE-9440
If removing the icefaces.jar and icefaces-ace.jar from theICE-9440.war file, the file upload on the demo page without ACE components (/simple.jsf) will pass in all browsers and no JS errors will occur.
Steps:
- build the app, deploy to Tomcat7 (ant clean servlet-profile); this will include all icefaces jars into the war file.
- go to: http://localhost:8080/ICE-9440/start.jsf, then select any h:inputFile demo page.
- browse for any type of file with a size <= 500K, and click "upload".
- if testing in FF27, the length of the uploaded file will be rendered on page, but a JS error will be seen in browser console; if testing in Chrome, no file length will be rendered on page, and no JS error will be seen. In IE10, no length will be rendered on page and the JS error will occur.
- stop the server, remove icefaces.jar, icefaces-ace.jar, icefaces-mobi.jar from the war file and repeat the upload test on the /simple.jsf demo page. No issues will be seen in any of the browsers.
The error message in FF27:
TypeError: e is undefined
http://localhost:8080/ICE-9440/javax.faces.resource/bridge.js.jsf?ln=ice.core&v=4_0_0_140224
Line 32
These issues can be reproduced using the test app from: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/ICE-9440
If removing the icefaces.jar and icefaces-ace.jar from the
Steps:
- build the app, deploy to Tomcat7 (ant clean servlet-profile); this will include all icefaces jars into the war file.
- go to: http://localhost:8080/ICE-9440/start.jsf, then select any h:inputFile demo page.
- browse for any type of file with a size <= 500K, and click "upload".
- if testing in FF27, the length of the uploaded file will be rendered on page, but a JS error will be seen in browser console; if testing in Chrome, no file length will be rendered on page, and no JS error will be seen. In IE10, no length will be rendered on page and the JS error will occur.
- stop the server, remove icefaces.jar, icefaces-ace.jar, icefaces-mobi.jar from the war file and repeat the upload test on the /simple.jsf demo page. No issues will be seen in any of the browsers.
The problem is caused by our form submit capturing. For "multipart/form-data" forms JSF will pass back the control to our fullSubmit function who fails to serialise properly the form.
ice.captureSubmit was changed to avoid hijacking the submit for forms that have "multipart/form-data" as encoding type attribute.