microscope-orionjs
microscope-orionjs copied to clipboard
Commenting returns error and number of comments always 0
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?
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
.
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..