-
22 Feb 2013 11:45 AM #1
Model class not found in built app
Model class not found in built app
I have huge extjs4 app started two years ago, now trying to import it to sencha cmd project
Generated new application witn sencha cmd, replaced app folder with my code, disabled autoloader
With sencha app build -e testing I can successfully build app-classes.js , but app doesnt loaded producing such errors:
'MyApp.model.Feature' exists and defined , app worked previously, and looks like problem is in files concatenating order - 'MyApp.model.Feature' firstly used on 121xxx line but defined on 123xxx line. How to fix this?PHP Code:[W] Ext.data.Store created with no model. The name 'MyApp.model.Feature' does not correspond to a valid model.
all-classes.js (line 11801)
TypeError: me.model is undefined
me.setProxy(me.proxy || me.model.getProxy());
all-classes.js (line 82431)
-
24 Feb 2013 5:58 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,637
- Vote Rating
- 435
Did you require it in the store or app.js?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Feb 2013 6:04 AM #3
Thanks, this and some other models were not required in some stores and views.
Should I always require models and stores that described in views stores models controller config sections ?
Finally I run my application correctly, but with ugly hack - I had to place 2 models and 3 stores
in 'MyApp/' (it is name for my Ext.Application) directory with subdirs 'model' and 'store' and 4 controllers and 3 views in '/bundles/myapp/js' directory (this path is defined as appFolder in Ext.Application) also with subdirs - because application tried to load it for that url and gets 404 .
Why may this happen, why there are two different paths, why only couple of files are loaded? While it can be some require problems for models and views I'm very confused for controllers that are properly defined in Ext.Application
-
25 Feb 2013 7:03 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,637
- Vote Rating
- 435
If a store is going to use a model, that store should require the model. If the model is going to be used without a store then put it in the models array in Ext.application
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Feb 2013 7:22 AM #5
Thanks. Loading of all this js files - models stores views and controllers - solved by 'If a store is going to use a model, that store should require the model' for two stores
-
25 Feb 2013 9:47 AM #6
Hm I'm getting the same thing - 404's on 2 files (one my model, another the validation, interestingly the model is the one that has validations on it). I've got my requires in place on the model, and its store. There are no errors or warnings when building, it says successfully deployed. Any ideas?
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote