Comments (14)
Yeah, there is a somewhat significant issue with the code, and this is likely related. I'm working on a fix.
from meteor-collection2.
No problem, thanks for the update.
from meteor-collection2.
0.3.2 still has this issue. Insert still throws an exception due to validation context being put in args[1], pushing the function collection hooks expects in args[1] to args[2]. Update & Delete work as expected.
from meteor-collection2.
@aldeed strange & technically off topic, but, I don't seem to be able to re-open this issue, seems like I should be able to, not sure what github's thinking is on this.
from meteor-collection2.
trying 0.3.3 now...
from meteor-collection2.
Yeah, my first fix was faulty. 0.3.3 should work.
from meteor-collection2.
Still doesn't work. The insert succeeds on the server with no exceptions thrown, the exception in question is thrown on the client only.
from meteor-collection2.
Hmm, maybe this issue is different. If you put collection-hooks
before or after collection2
in your packages list, does it make any difference?
from meteor-collection2.
Doesn't appear to make a difference.
from meteor-collection2.
OK, there is a tiny change that can be made to the collection-hooks package to fix this. I'll do a PR for it.
It seems collection-hooks
is always being loaded after collection2, so the extra options
argument is still there when collection-hooks
does its thing. By switching CH to use the last arg as the callback instead of the second arg, this is fixed. That's more future-proof for CH, anyway.
from meteor-collection2.
Ok, so I tested with your fork of collection-hooks
and while that particular issue is resolved the error messages are not displaying because the validation is happening against the default context instead of the context specified by the autoForm
id
. Seeing as the args[1]
collection-hooks
with tripping on was the expected validationContext
I'm guessing this is a related issue. Same autoForm
, works without issue on update case.
from meteor-collection2.
Hmm, yes, I see the issue.
from meteor-collection2.
Can you test with my fork now? I think it will work now.
from meteor-collection2.
looks good, thank you
from meteor-collection2.
Related Issues (20)
- Upsert no longer works in 3.0.5
- Duplicate key errors not correctly reporting (no Meteor.Error) HOT 3
- Migration from Meteor 1.4 to 1.9, Collection 2 from 2.10 to 3.0, SimpleSchema with meteor-collection2 error on unique option HOT 3
- Can't update the collection HOT 3
- Dynamic Schema with Validation HOT 10
- Is it possible to create field type that takes key and value pair? HOT 4
- Writing a robust updatedAt autoValue HOT 4
- CONTRIBUTING.md is missing HOT 1
- Breaking change in v3.2.0 for extending schemas HOT 2
- Delete the name of collections in error messages HOT 5
- Question: A way to log all errors without actually throwing them? HOT 1
- Does not work with `$[]` positional operator HOT 1
- relplace lodash with underscore HOT 3
- FLE-Encryption HOT 3
- Expose defaultCleanOptions HOT 10
- Apply `defaultValue` on `fetch` HOT 6
- Stub exceptions are logged instead of thrown in Meteor Methods, preventing throwStubExceptions from working as intended
- Meteor 3.0 potential bug HOT 6
- 4.0 load function is not dynamic HOT 2
- Insert with 'bypassCollection2: true' throws an exception HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-collection2.