PDA

View Full Version : Uncaught TypeError: Cannot call method 'substring' of undefined ext-debug.js:5054



vanuatoo
18 Sep 2013, 6:00 PM
Hello,

I'm using ExtJS 4.2.1.883
I'm following documentation and created first MVC application
http://docs.sencha.com/extjs/4.1.3/#!/guide/application_architecture

I've defined controller and view. When I try to run the application which should display the grid with some data it gives me this error

Uncaught TypeError: Cannot call method 'substring' of undefined (05:50:31:639 | error, javascript)
at Ext.ClassManager.parseNamespace (public_html/extjs/ext-debug.js:5054:43)
at Ext.ClassManager.get (public_html/extjs/ext-debug.js:5162:26)
at Ext.ClassManager.instantiate (public_html/extjs/ext-debug.js:5445:28)
at Ext.ClassManager.instantiateByAlias (public_html/extjs/ext-debug.js:5427:37)
at Ext.apply.widget (public_html/extjs/ext-debug.js:5712:32)
at Ext.define.create (public_html/extjs/src/ComponentManager.js:56:20)
at Ext.define.lookupComponent (public_html/extjs/src/container/AbstractContainer.js:567:65)
at Ext.define.prepareItems (public_html/extjs/src/container/AbstractContainer.js:537:31)
at Ext.define.add (public_html/extjs/src/container/AbstractContainer.js:640:26)
at Ext.define.initItems (public_html/extjs/src/container/AbstractContainer.js:346:16)
at Ext.define.initComponent (public_html/extjs/src/container/AbstractContainer.js:324:12)
at Base.implement.callParent (public_html/extjs/ext-debug.js:4263:32)
at Ext.define.initComponent (public_html/extjs/src/container/Viewport.js:146:12)
at Ext.define.constructor (public_html/extjs/src/AbstractComponent.js:1206:12)
at Base.implement.callParent (public_html/extjs/ext-debug.js:4263:32)
at Ext.define.constructor (public_html/extjs/src/Component.js:374:12)
at constructor (public_html/extjs/ext-debug.js:4894:37)
at (:3:8)
at Ext.ClassManager.instantiate (public_html/extjs/ext-debug.js:5482:53)
at (public_html/extjs/ext-debug.js:2109:39)
at Ext.application.launch (public_html/app.js:6:13)
at Ext.define.onBeforeLaunch (public_html/extjs/src/app/Application.js:371:19)
at Ext.define.constructor (public_html/extjs/src/app/Application.js:291:12)
at constructor (public_html/extjs/ext-debug.js:4894:37)
at (public_html/extjs/ext-debug.js:7791:40)
at (public_html/extjs/ext-debug.js:9860:28)
at fire (public_html/extjs/ext-debug.js:9815:49)
at Ext.apply.readyEvent.readyEvent.fire (public_html/extjs/ext-debug.js:10049:52)
at Ext.apply.fireReadyEvent (public_html/extjs/ext-debug.js:10127:28)
at Ext.apply.onDocumentReady (public_html/extjs/ext-debug.js:10145:34)
at fn (public_html/extjs/ext-debug.js:6655:25)
at Ext.apply.triggerReady (public_html/extjs/ext-debug.js:6641:29)
at Ext.apply.refreshQueue (public_html/extjs/ext-debug.js:6203:39)
at Ext.apply.refreshQueue (public_html/extjs/ext-debug.js:6204:32)
at Ext.apply.onFileLoaded (public_html/extjs/ext-debug.js:6584:24)
at (public_html/extjs/ext-debug.js:2102:23)
at onLoadFn (public_html/extjs/ext-debug.js:6227:36)

Attaching project html root files without extjs files

jay@moduscreate.com
20 Sep 2013, 5:11 AM
That error means that you're trying to create an instance of a component via xtype and the XType is not defined (Class is not loaded or you botched the XType)

So... to fix this, require your view via the 'requires' or 'views' declarations on the Application configuration.