Recommendation place for "Collection Hooks" package?


#1

I use collection2, simpleSchema and autoform.
And now I try collection hooks.
Does it have problem with load order? If have, I should which before…
I should use collection hooks on client or server (recommendation).


#2

I found big problem for me: you can’t use hook before.insert and pass validation on collection2/simpleSchema.
I mean, if fields required


#3

Wow, I want to record user events (audit) by using this package.
How to solve?


#4

Mark fields as not required (-: Or like blackbox
Fields, which you want to use in hooks.


#5

but now I tried, it is OK (set collection hooks on server).


#6

Strange…because validation always before insert…if you use required fields in before.insert hook, when you can’t pass validation…very strange, I could not do it
This thread https://github.com/matb33/meteor-collection-hooks/issues/109

If validation fails then there is no insert/update and if there isn’t an insert/update the before.insert/update hooks won’t run. Which I feel is correct.


#7

I am not sour, how it work?


#8

Now I tried use collection-hooks on client, when autoform validation is error the hooks still running (before hooks).
How to solve?