PDA

View Full Version : upgrade from 4.07 to 4.1



maosim
2 Jul 2012, 6:37 AM
Hello,
i'm a newbie.
While upgrading my infrastructure from Extjs 4.07 to 4.1 i get the following errors:
"Uncaught TypeError: Cannot call method 'push' of undefined "
"Uncaught TypeError: Cannot read property 'readyState' of undefined "
"Uncaught TypeError: Cannot call method 'setSize' of undefined"

the code causing it is:
x.add( obj.panel );
x.doLayout( false, true );
x.show();

whereas x is Ext.container.Container and obj.panel is Ext.form.Panel

scottmartin
2 Jul 2012, 12:52 PM
We are going to need a small working test case to allow us to help.

Scott.

Artur Bodera (Joust)
9 Jul 2012, 4:13 AM
Stumbled upon the same thing (same codebase, replaced 4.0.7 with 4.1) - for every store that is loaded, an exception is raised after it finishes loading:

Uncaught TypeError: Cannot read property 'readyState' of undefined - Connection.js:818
Ext.define.onStateChange - Connection.js:818
(anonymous function) - ext.js:21
It appears that onStateChange() method is receiving a request object that's missing xhr property. Here's what's inside:

request = Object

async: true
headers: Object
id: 4
options: Object
__proto__: Object

Artur Bodera (Joust)
9 Jul 2012, 8:00 AM
Ops. Moderator ?

Could you please undelete my previous post. It kinda explains this potential bug.

hmcdaniel12
31 Jul 2012, 7:45 PM
Calling Ext.Ajax.request(...) is where I am seeing the issue, if the server returns {'success':false, 'message':'blah'}for the response




Ext.define('SB.controller.User', {
extend: 'Ext.app.Controller',


models: [
'User'
],
views: [
'user.Login'
],


init: function(application) {
this.control({
'userlogin button[id=loginsubmit]': {
click: this.loginUser
},
'userlogin fieldcontainer[id=loginfieldcontainer] textfield': {
keypress: this.checkLoginEnter
},
'userlogin button[id=changepasswordsubmit]': {
click: this.changePassword
},
'userlogin fieldcontainer[id=changepasswordfieldcontainer] textfield': {
keypress: this.checkChangePasswordEnter
}
});


Ext.ns('SB');


SB.BTN_OK = 'ok';
SB.BTN_YES = 'yes';
// min. before notifying the user her session will expire.
SB.SESSION_ABOUT_TO_TIMEOUT_PROMT_INTERVAL_IN_MIN = 5;
// 1 min. to kill the session after the user is notified.
SB.GRACE_PERIOD_BEFORE_EXPIRING_SESSION_IN_MIN = 1;
// The page that kills the server-side session variables.
SB.SESSION_FIND_URL = '/sbps/xFindSession';
SB.SESSION_KILL_URL = '/sbps/xKillSession';
SB.SESSION_REVIVE_URL = '/sbps/xReviveSession';


// Helper that converts minutes to milliseconds.
SB.toMilliseconds = function (minutes) {
return minutes * 60 * 1000;
};


// Helper that simulates AJAX request.
SB.simulateAjaxRequest = function () {


Ext.Ajax.request({
url: SB.SESSION_REVIVE_URL,
success: Ext.emptyFn,
failure: Ext.emptyFn
});
};
SB.simulateAjaxRequest();
}

//snip


});