orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

update orion.js – error "has no method 'onCreated'" #383

Open dwehrmann opened 8 years ago

dwehrmann commented 8 years ago

Hi,

to get this straight, I am just starting with meteor and orion.js, so – sorry if there are obvious things I missed.

I originally had forked iamkevingreen's Orion-Starter setup (https://github.com/iamkevingreen/Orion-Starter) to get things started, then ran into issues with delete buttons in the backend not working, etc. I figured the Orion-Starter branch was build on an old orion.js and my problems are mostly fixed in current orion.js versions.

So I went and cloned the current orion.js repository, set it all up and once it was running fine, I copied my current project (from the Orion-Starter) over. Is that the right way to update the orion.js component while keeping my work?

Moreover, I had to add a lot of missing packages but now when I run meteor, I get the following error:

Can anybody advise what I'm doing wrong?

/Users/SB3/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/nodemodules/fibers/future.js:245 W20160104-15:48:17.278(1)? (STDERR) throw(ex); W20160104-15:48:17.278(1)? (STDERR) ^ W20160104-15:48:17.297(1)? (STDERR) TypeError: Object function (name, options) { // 6 W20160104-15:48:17.297(1)? (STDERR) check(name, String); // 7 W20160104-15:48:17.297(1)? (STDERR) check(options, Object); // 8 W20160104-15:48:17.297(1)? (STDERR) // W20160104-15:48:17.297(1)? (STDERR) var collection = new Mongo.Collection(name, options); // 10 W20160104-15:48:17.297(1)? (STDERR) // W20160104-15:48:17.298(1)? (STDERR) options = .extend({ // 12 W20160104-15:48:17.298(1)? (STDERR) name: name, // 13 W20160104-15:48:17.298(1)? (STDERR) routePath: name, // 14 W20160104-15:48:17.298(1)? (STDERR) pluralName: name, // 15 W20160104-15:48:17.298(1)? (STDERR) singularName: name, // 16 W20160104-15:48:17.298(1)? (STDERR) title: name[0].toUpperCase() + name.slice(1) // 17 W20160104-15:48:17.298(1)? (STDERR) }, options); // W20160104-15:48:17.299(1)? (STDERR) // W20160104-15:48:17.299(1)? (STDERR) collection = _.extend(collection, options); // 20 W20160104-15:48:17.299(1)? (STDERR) // W20160104-15:48:17.299(1)? (STDERR) for (var i = 0, N = orion.collection.hooks.onCreated.length; i < N; i++) { // 22 W20160104-15:48:17.299(1)? (STDERR) orion.collection.hooks.onCreated[i].call(collection); // 23 W20160104-15:48:17.299(1)? (STDERR) } // W20160104-15:48:17.300(1)? (STDERR) // W20160104-15:48:17.300(1)? (STDERR) collection.helpers({ // 26 W20160104-15:48:17.300(1)? (STDERR) _collection: function () { // 27 W20160104-15:48:17.300(1)? (STDERR) return collection; // 28 W20160104-15:48:17.300(1)? (STDERR) } // W20160104-15:48:17.301(1)? (STDERR) }); // W20160104-15:48:17.301(1)? (STDERR) // W20160104-15:48:17.301(1)? (STDERR) orion.collection.list[name] = collection; // 32 W20160104-15:48:17.301(1)? (STDERR) return collection; // 33 W20160104-15:48:17.301(1)? (STDERR) } has no method 'onCreated' W20160104-15:48:17.301(1)? (STDERR) at orion.collection.onCreated.self (permissions.js:1:18) W20160104-15:48:17.301(1)? (STDERR) at /Users/SB3/www/bw-orion/.meteor/local/build/programs/server/packages/orionjs_collections.js:178:4 W20160104-15:48:17.302(1)? (STDERR) at /Users/SB3/www/bw-orion/.meteor/local/build/programs/server/packages/orionjscollections.js:331:3 W20160104-15:48:17.302(1)? (STDERR) at /Users/SB3/www/bw-orion/.meteor/local/build/programs/server/boot.js:242:10 W20160104-15:48:17.302(1)? (STDERR) at Array.forEach (native) => Exited with code: 8 W20160104-15:48:17.303(1)? (STDERR) at Function..each._.forEach (/Users/SB3/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) W20160104-15:48:17.303(1)? (STDERR) at /Users/SB3/www/bw-orion/.meteor/local/build/programs/server/boot.js:137:5