Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Extjs 6.5 File upload form set Success to TRUE even if return SUCCESS is FALSE.
While uploading a test image and some form data. I purposely set sent missing data to force a failure on the server and return SUCCESS:FALSE.
Supposedly a message box should pop-up since SUCCESS was set to FALSE but instead executes the SUCCESS:TRUE code.
Image attached on the logs from firefox. One from the server return response and the other from the form response in the console log.
02.png01.jpg
PHP Code:
if( form.validate() ){
showLoadMask( window );
form.submit({
success: function(form, action) {
console.log( action );
hideLoadMask(window);
if ( action.success === true ) {
if ( callback !== undefined ) {
callback();
}
window.destroy();
} else {
Ext.Msg.show({
title: 'Error!',
message: action.reason,
width: 400,
buttons: [{
text: 'Ok',
style:'margin-right:10px;',
handler: function() {
Ext.Msg.hide();
}
}]
});
}
},
failure: function(form, response) {
console.log( response );
hideLoadMask(window);
if ( response.success === false ) {
Ext.Msg.show({
title: 'Error!',
message: response.reason,
width: 400,
buttons: [{
text: 'Ok',
style:'margin-right:10px;',
handler: function() {
Ext.Msg.hide();
}
}]
});
}
}
});
}
-
I'm getting the same problem on 6.2.1. Have you found something to solve this problem?