Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Error : During Dynamic mojit creation #1387

Open
muhilvarnan opened this issue Sep 25, 2014 · 1 comment
Open

Error : During Dynamic mojit creation #1387

muhilvarnan opened this issue Sep 25, 2014 · 1 comment

Comments

@muhilvarnan
Copy link

HI,
I just trying out few tutorials in the mojito, and got stuckup in the dynamic mojit creation.
whether we include a grand child in the dynamic mojit at controller file.
I do not know this is a issue or i didnt understand concept.. ,, need a help in this :
this is my controller index action :

index: function(ac) {
        ac.models.get('model').getData(function(err, data) {
        var cfg = { view: "index",
              children: {
                frame: { 
                    type: "frame", 
                    action: "index",
                    config:    {
                        children: {
                            body:
                            { 
                                type:"Body",
                                action:"index"
                            },
                            footer: { type: "footer", action: "index" }
                        }
                    }
                 }
              }
            }; 
        ac.composite.execute(cfg,function(data, meta){
    ac.done(data, meta);
 });

Error which i get is :

Error dispatching '@Header':
TypeError: Cannot call method 'get' of undefined
at Object.Y.namespace.index (/home/local/PAYODA/madhankumar.p/dynamic/mojits/header/controller.server.js:25:23)
at Object.ActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/action-context.common.js:364:35)
at Object.Y.namespace.Dispatcher._createActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:67:22)
at /home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:163:28
at ResourceStore.Y.extend.expandInstanceForEnv (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:613:13)
at ResourceStore.Y.extend.expandInstance (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:547:18)
at Object.Y.namespace.Dispatcher.dispatch (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:135:19)
at Object.ActionContext._dispatch as dispatch
at Object.Addon.addChild (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:341:18)
at Object.Addon.execute (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:195:44)
error: (mojito-output-buffer): Error executing: 'mojito-composite-addon::@undefined:index':
error: (mojito-output-buffer): Cannot call method 'get' of undefined
error: (mojito-output-buffer):

TypeError: Cannot call method 'get' of undefined
at Object.Y.namespace.index (/home/local/PAYODA/madhankumar.p/dynamic/mojits/header/controller.server.js:25:23)
at Object.ActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/action-context.common.js:364:35)
at Object.Y.namespace.Dispatcher._createActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:67:22)
at /home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:163:28
at ResourceStore.Y.extend.expandInstanceForEnv (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:613:13)
at ResourceStore.Y.extend.expandInstance (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:547:18)
at Object.Y.namespace.Dispatcher.dispatch (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:135:19)
at Object.ActionContext._dispatch as dispatch
at Object.Addon.addChild (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:341:18)
at Object.Addon.execute (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:195:44)

@aljimenez
Copy link
Contributor

Hello, the error is occurring at "dynamic/mojits/header/controller.server.js:25:23". Looks like its calling a method 'get' on an object that is undefined. I can't tell what is going on without seeing the header mojit controller; but perhaps a module that that controller is expecting was not properly loaded. There might be some YUI "module not loaded" messages on your console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants