fuzzybabybunny / microscope-orionjs

MIT License
19 stars 8 forks source link

Commenting returns error and number of comments always 0 #3

Open artelse opened 8 years ago

artelse commented 8 years ago

I get this error when I try to comment on a post: Exception while invoking method 'commentInsert' TypeError: Cannot read property 'profile' of undefined I20151020-21:00:57.938(2)? at Object.Posts.attachSchema.SimpleSchema.author.autoValue (lib/collections/schemas/posts.js:80:1)

The console message is: Exception while simulating the effect of invoking 'commentInsert' TypeError: user is undefined

Then on the home page, all comments display as zero. Any ideas how to fix?

fuzzybabybunny commented 8 years ago

If I had to guess, this is almost assuredly with the user object not existing. The profile key is on the user object. You're trying to insert a comment when there isn't a user.

artelse commented 8 years ago

Likely, I just followed the tutorial and am learning, but found this problem. Any hint how to correct? Also the 0 comments are not right..