You found a bug! We've classified it as EXTJS-10357 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    62
    Vote Rating
    1
    Werzi2001 is on a distinguished road

      0  

    Default [4.2.1] Error from file upload form submit doesn't call requestexception

    [4.2.1] Error from file upload form submit doesn't call requestexception


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.1


    Browser versions tested against:
    • IE9
    • FF20.0.1
    • dont't think it matters


    Description:
    An http status error code from a form submit with file upload doesn't cause the requestexception event to be fired. Instead the requestcomplete event is fired as it was successful

    Steps to reproduce the problem:
    • Click "form submit" button in example code
    • Click on "AJAX" button perfomrs correctly
    • Change filefield to textfield and "form submit" performs correctly


    The result that was expected:
    • requestexception event to be fired


    The result that occurs instead:
    • requestcomplete event is fired


    Test Case:

    Code:
    <!DOCTYPE html>
    <html>
      <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>Test</title>
    
        <script type='text/javascript' src='//cdn.sencha.io/ext/gpl/4.2.1/ext-all.js'></script>
        <link rel="stylesheet" type="text/css" href="//cdn.sencha.io/ext/gpl/4.2.1/resources/css/ext-all-neptune.css">
    
        <script type='text/javascript'>//<![CDATA[ 
          Ext.onReady(function() {
            Ext.util.Observable.observe(Ext.data.Connection);
            Ext.data.Connection.on('beforerequest', function(conn, options) {
              console.log('Start');
            });
            Ext.data.Connection.on('requestcomplete', function(conn, response, options) {
              console.log('Success');
            });
            Ext.data.Connection.on('requestexception', function(conn, response, options) {
              console.log('Error');
            });
    
            var formpanel = Ext.create('Ext.form.Panel', {
              renderTo: document.body,
              items: [{
                xtype: 'filefield',
                name: 'test'
              }]
            });
            Ext.create('Ext.button.Button', {
              renderTo: document.body,
              text: 'AJAX',
              listeners: {
                click: function() {
                  Ext.Ajax.request({
                    url: '/404.html'
                  });
                }
              }
            });
            Ext.create('Ext.button.Button', {
              renderTo: document.body,
              text: 'Form submit',
              listeners: {
                click: function() {
                  formpanel.getForm().submit({
                    url: '/404.html'
                  });
                }
              }
            });
          });    
          //]]>  
        </script>
      </head>
      <body>
      </body>
    </html>

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,795
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    62
    Vote Rating
    1
    Werzi2001 is on a distinguished road

      0  

    Default


    Is there any progress here? The bug still exists in ExtJS 4.2.2.

Thread Participants: 1