Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    79
    Vote Rating
    34
    fdp has a spectacular aura about fdp has a spectacular aura about

      0  

    Default Ext 4.2.1 Ext.data.proxy.reader.Reader success even if no success in response

    Ext 4.2.1 Ext.data.proxy.reader.Reader success even if no success in response


    Consider a Proxy with a Json Reader,
    the reader Url returns an empty response,
    There is no "success":true or "success":false response
    The response is considered a success and all exception events are not fired

    Ext code is here:
    Code:
            if (me.successProperty) {
                value = me.getSuccess(data);
                if (value === false || value === 'false') {
                    success = false;
                }
            }
    I think it is better consider unsuccessfully a response with success undefined

    Full proof here (see console log):
    http://jsfiddle.net/kzaxG/

    Code:
    /*
     http://cdn.sencha.io/ext-4.2.0-gpl/ext-all.js
     http://cdn.sencha.io/ext-4.2.0-gpl/resources/ext-theme-neptune/ext-theme-neptune-all.css
     Ext 4.2.1 Ext.data.proxy.reader.Reader success even if no success in response
     */
    
    
    Ext.application({
      name: 'MyApp',
      launch: function () {
        console.log("MyApp launch");
        var row = Ext.create('MyApp.model.Contact', {
          id_contact: 123,
          contact_firstname: 'abc'
        });
        row.save({
          failure: function (record, operation, success) {
            console.log("Model save failure");
          },
          success: function (record, operation, success) {
            console.log("Model save success");
          },
          callback: function (record, operation, success) {
            console.log("Model save callback");
          }
        });
      }
    });
    
    
    Ext.define('MyApp.model.Proxy', {
      extend: 'Ext.data.proxy.Ajax',
      reader: {
        type: 'json',
        root: 'root'
      },
      writer: {
        type: 'json',
        allowSingle: false
      },
      constructor: function (config) {
        var me = this;
        me.callParent([config || {}]);
        me.on('exception', me.onException, me);
      },
      onException: function (proxy, response, operation) {
        console.warn("Proxy exception for operation: " + operation.action + ' url: ' + response.request.options.url + ' response: ' + response.responseText);
      } // onException
    });
    
    
    Ext.define('MyApp.model.Contact', {
      extend: 'Ext.data.Model',
      idPropery: 'id_contact',
      fields: [
        {name: 'id_contact', type: 'int'},
        {name: 'contact_firstname', type: 'string'}
      ],
      proxy: Ext.create('MyApp.model.Proxy', {
        // see http://doc.jsfiddle.net/use/echo.html
        url: '/echo/js/?js=' // this return http status 200 with response empty
      })
    });
    Regards

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Vote Rating
    179
    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 slemmon is a splendid one to behold

      0  

    Default


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

    This sounds like a breaking change - the dev team will review the report and discuss internally.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi