View Full Version : Upgrading from ExtJS 4.0.7 to 4.2.1 causing TypeError

18 Sep 2014, 5:00 PM
I have a cloud based query feature which receives xml back from a server. One of the query results returns XML with namespaces, so was considering upgrading from 4.0.7 to 4.2.1 to leverage the namespace feature in 4.2.1.

Upon pointing to the ExtJS 4.2.1 libraries, and not making any code changes, I always receive an error in the JavaScript console of TypeError: ownerContext.bodyContext is null.

I'm using the ext-all-debug-w-comments.js and the error line it is pointing to is in the publishInnerWidth function in the Ext.define of the Ext.Layout.component.body. The particular statement the error is referencing is:


I did not reference the body in ExtJS 4.0.7 and the code did not have any errors, but changing to ExtJS 4.2.1 brings this out.

Again, the reason I'm trying to upgrade is to take advantage of the namespace because the xml I am trying to read contains namespaces in the tags (see below)

<ns2:queryId>Some query value</ns2:queryId>

If anyone can give me an idea how to define my fields for the proxy/store to handle the namespace ns2 in ExtJS 4.0.7, then I will scrap the upgrade.

18 Sep 2014, 7:50 PM
Sounds like you have a bad layout. Ext 4.07 was a sloppy release and allowed a lot of bad layouts. In later versions, the API would not allow for this to happen.

I would what it was required to move away from 4.07 and get the new version working.