-
Notifications
You must be signed in to change notification settings - Fork 11
/
DEVELOPERS.txt
42 lines (34 loc) · 2.74 KB
/
DEVELOPERS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Common bugs, symptoms and causes:
You don't see data on the UI, that should be there
- You are not subscribed to it. Check the mongo db, if its there, then this is the case.
Check what subscriptions are active in Mongol.
- Possible that you are subscribed, but the subscription doesn't publish the fields you are looking for.
Check the subscription's code.
Validation error, missing a field, even though it should be default or auto
Important:Validation happens (1st) on the autoform, (2nd) on the method call (client, then server), (3rd) in the db operation.
- if autoform.omit: true, then defaultValue is not recognized at (1st), so (1st) will complain
solution: Don't use omit: true, use omitFields instead
- defaultValue only applied at (2nd) if clean: true in the method validation
solution: If you use insert method with doc param, make sure you have clean: true
- autoValue only applied at the (3rd)
solution: When you use autovalue, always pair it with optional: true , otherwise it will fail at (2nd)
Autoform update crashes with internal server error (Error: When the validation object contains mongo operators, you must set the modifier option to true)
- The autoform update-method is passing two method parameters (mongo modifier object, doc id)
ValidatedMethod expects a single parameter object with named parameters _id, modifier
solution: Use singleMethodArgument=true as a form attribute on a method-update type autoforms.
Exception while trying to find an element by id
- You are using Collection.find(_id) instead of Collection.findOne(_id)
find() returns a Cursor, that can be fetch()-ed, findOne() returns an actual Document.
Application crashes. (You recently edited the translations)
- You miss a comma, or have an extra comma somewhere.
The JSON files don't tolerate trailing commas. Last property cannot end with comma, the others have to.
Translation of autoform fields doesn't show for you language
- You have accidentally overridden the translation, eg had "topic" as object, so "topic.text.label" was a translated field,
but then you put in a translation for "topic". This replaces the whole "topic" object, so those translations are lost.
- You have "collection.field.label" translated in your language, but not in english.
The field path has to be translated into english (even if thats just the same as key) for autoform-i18n to work.
Error: "Can't find npm module 'meteor/session'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?"
- Session, Template and all UI libraries can only be imported on client side.
solution: put them under a 'client' dir, or under 'imports'.
Your tests time out (many or all), complains you should call the 'done()' function
- The machine is overloaded. Quit some apps.