Code Monkey home page Code Monkey logo

Comments (14)

aldeed avatar aldeed commented on May 17, 2024

Yeah, there is a somewhat significant issue with the code, and this is likely related. I'm working on a fix.

from meteor-collection2.

mjgallag avatar mjgallag commented on May 17, 2024

No problem, thanks for the update.

from meteor-collection2.

mjgallag avatar mjgallag commented on May 17, 2024

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.

mjgallag avatar mjgallag commented on May 17, 2024

@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.

mjgallag avatar mjgallag commented on May 17, 2024

trying 0.3.3 now...

from meteor-collection2.

aldeed avatar aldeed commented on May 17, 2024

Yeah, my first fix was faulty. 0.3.3 should work.

from meteor-collection2.

mjgallag avatar mjgallag commented on May 17, 2024

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.

aldeed avatar aldeed commented on May 17, 2024

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.

mjgallag avatar mjgallag commented on May 17, 2024

Doesn't appear to make a difference.

from meteor-collection2.

aldeed avatar aldeed commented on May 17, 2024

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.

mjgallag avatar mjgallag commented on May 17, 2024

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.

aldeed avatar aldeed commented on May 17, 2024

Hmm, yes, I see the issue.

from meteor-collection2.

aldeed avatar aldeed commented on May 17, 2024

Can you test with my fork now? I think it will work now.

from meteor-collection2.

mjgallag avatar mjgallag commented on May 17, 2024

looks good, thank you

from meteor-collection2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.