PDA

View Full Version : [FIXED-195] Cannot read property 'params' of undefined" when AjaxProxy is destroyed



orangechicken
2 Aug 2010, 4:40 PM
Using 0.9.1 (though it appears the pertinent areas of code remain unchanged in 0.9.2). Here's the stack with some additional notes for some of the calls:



buildRequest ext-touch-debug-w-comments.js:16486 // Results in error
doRequest ext-touch-debug-w-comments.js:16644 // Called with no arguments
destroy ext-touch-debug-w-comments.js:16476
destroy ext-touch-debug-w-comments.js:635
destroyStore ext-touch-debug-w-comments.js:15254
bindStore ext-touch-debug-w-comments.js:21638 // Called with null
onDestroy ext-touch-debug-w-comments.js:21859
onDestroy ext-touch-debug-w-comments.js:22304
destroy ext-touch-debug-w-comments.js:20003
doRemove ext-touch-debug-w-comments.js:20982
beforeDestroy ext-touch-debug-w-comments.js:21085
destroy ext-touch-debug-w-comments.js:20003
doRemove ext-touch-debug-w-comments.js:20982
remove ext-touch-debug-w-comments.js:20972
removeAll ext-touch-debug-w-comments.js:21009
onViewDataChanged application.js:304
fire ext-touch-debug-w-comments.js:3766
fireEvent ext-touch-debug-w-comments.js:3284
loadRecords ext-touch-debug-w-comments.js:15152
onProxyRead ext-touch-debug-w-comments.js:14834
<anonymous> ext-touch-debug-w-comments.js:16682
onComplete ext-touch-debug-w-comments.js:12600
onStateChange ext-touch-debug-w-comments.js:12591
<anonymous> ext-touch-debug-w-comments.js:903
(program)


buildRequest needs to handle receiving undefined for the operation argument. It *is* curious that removing my component tries to make a request to the server... it should not.

Let me know if you need more information,
Dave

orangechicken
2 Aug 2010, 4:57 PM
Well the forums just ate a reply with more info so I'll try retyping.

I think the problem may lie in the fact that Proxy's define a `destroy` method as part of a CRUD vocabulary. This then gets conflated with a component-style destroy method when Ext.data.Store.destroyStore calls `Ext.destroy(this.proxy)`. Since this.proxy.destroy *is* a method, Ext calls it without arguments at ext-touch-debug-w-comments.js:645. Unfortunately, this isn't the kind of destroy method Ext is expecting (once again, being part of a CRUD vocab).

Jamie Avins
3 Aug 2010, 9:01 AM
Thank you for the report.

TommyMaintz
1 Sep 2010, 7:14 PM
This has been fixed and will be part of tomorrow's 0.94 release.