PDA

View Full Version : [4.2.*] TypeError: records is undefined



YuraSocolov
3 Oct 2013, 11:31 AM
REQUIRED INFORMATION


Ext version tested:
Ext 4.2.*, including 4.2.2 and 4.2.2.1162

Browser versions tested against:
All

Description:
A bug in grid load store function manifests itself with infinite grid and a buffered store as javascript error:
TypeError: records is undefined on line 95429 of 4.2.2.1162.


FIX against 4.2.2.1162:

*** ext-all-debug.js.orig Thu Oct 3 19:26:23 2013
--- ext-all-debug.js Thu Oct 3 19:28:05 2013
***************
*** 95426,95431 ****
--- 95426,95432 ----
return true;
} else {
records = store.data.items;
+ if(records === undefined) { return false}
len = records.length;
id = record.internalId;

Gary Schlosberg
3 Oct 2013, 12:24 PM
Can you please post a small test case which reproduces the issue so we can see what's causing this? Thanks.

YuraSocolov
3 Oct 2013, 12:40 PM
I don't need to do anything special to trigger this. A buffered store with a lot of records, store.load() triggers it consistently every time.

My store is setup like this:



var s = Ext.create('Ext.data.Store', {
id: 'store',
model: 'Stack',
pageSize: 1000,
leadingBufferZone: 500,
proxy: {
type: 'ajax',

url: 'XXX',
actionMethods: {
read: 'GET',
write: 'POST'
},
reader: {
root: 'data',
totalProperty: 'total',
},
writer: {
root: 'data',
writeAllFields: 'true',
type: 'json',
},
simpleSortMode: true
},
remoteSort: true,
autoSync: true,
buffered: true,
sorters: [{
property: 'elem_ts',
direction: 'DESC'
}]
});

Gary Schlosberg
7 Oct 2013, 9:41 AM
Thank you for your store code. Approximately how many records do I need to recreate this? Are you using BufferedRendering or any other features or plugins on the grid?

YuraSocolov
23 Oct 2013, 10:43 AM
Sorry about the delay here.

It's triggered with as few as a couple of thousand records, although typically my store has at least 500K.

The store is always buffered: true, and it doesn't matter whether i also configure bufferedrenderer plugin -- same result.

ra0ahc
5 Dec 2013, 5:18 AM
same problem
how we can tempory drop the bug?