microscope-orionjs icon indicating copy to clipboard operation
microscope-orionjs copied to clipboard

Commenting returns error and number of comments always 0

Open artelse opened this issue 9 years ago • 2 comments

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?

artelse avatar Oct 20 '15 19:10 artelse

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.

fuzzybabybunny avatar Oct 20 '15 22:10 fuzzybabybunny

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..

artelse avatar Oct 20 '15 22:10 artelse