guncebektas / meteor-friendly-slugs

Meteor package to generate URL friendly slugs from a field with auto-incrementation to ensure unique URLs.
65 stars 15 forks source link

Getting an exception from sub comment id #10

Closed diegodesouza closed 9 years ago

diegodesouza commented 9 years ago
Exception from sub comments id 4HkneRedx6infdbkg Error: Match error: Expected string, got object
at checkSubtree (packages/check/match.js:159:1)
at check (packages/check/match.js:32:1)
at [object Object].Meteor.publish.Notifications.find.userId (app/server/publications.js:15:3)
at packages/matb33:collection-hooks/collection-hooks.js:218:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at [object Object]._handler (packages/matb33:collection-hooks/collection-hooks.js:217:1)
at packages/check/match.js:109:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
Sanitized and reported to the client as: Match failed [400]

I am getting this exception. http://localhost:3000/posts/something-there The route changes to the post title but no data comes in.

todda00 commented 9 years ago

Looks like this isn't occurring directly from friendlySlugs, but from its inclusion of collection hooks, since this is happening in a find(), and friendlySlugs does not implement a hook for find(). Seems that collection hooks was expecting a string but got an object within the find(). Can you provide the code for Meteor.publish.Notifications.find.userId at app/server/publications.js ?

todda00 commented 9 years ago

@diegodesouza any more info on this issue? If not, I will close the ticket.

diegodesouza commented 9 years ago

I'd say you can close this ticket, I'm not sure what the problem was. You might be right that the problem was something else. Thanks