PDA

View Full Version : [FIXED] [2.1.0] Ext.data.proxy.SQL crash on select with no sorters



NiNiX
14 Nov 2012, 1:55 PM
Hi,

The SQL proxy crashes at line 281:

ln = params.sorters.length;

with the following error message: Uncaught TypeError: Cannot read property 'length' of null

Use case:


Ext.define('App.model.Game', {
    extend: 'Ext.data.Model',
    config: {
        fields: [
            { name: 'id', type: 'int' },
{ name: 'name', type: 'string' }
        ],

        proxy: { type: 'sql' }
    }
});


var store = Ext.create('Ext.data.Store', {
model: 'App.model.Game',
filters: [ {property: 'name', value: 'foo'} ],
remoteFilter: true
});

store.load(function(records, operation, success) {
[...]
}

Same kind of bug than those reported in this thread (http://www.sencha.com/forum/showthread.php?246259-ST2.1-RC2-SQL-Proxy-accessing-incorrect-Filter-property) and this one (http://www.sencha.com/forum/showthread.php?246177-ST2.1-RC2-Crash-when-new-SQL-Proxy-without-quot-filter-quot), but 13 lines below ;)

Thanks

mitchellsimoens
15 Nov 2012, 10:25 AM
Thanks for the report! I have opened a bug in our bug tracker.