meteor-admin icon indicating copy to clipboard operation
meteor-admin copied to clipboard

crash on breaking unique constraint

Open Obiwarn opened this issue 10 years ago • 6 comments

I get no validation message for a Autoform unique field.

My admin crashes when I break a unique constraint.

Obiwarn avatar Jan 08 '15 23:01 Obiwarn

This is almost certainly an autoform issue. Admin just renders the autoform forms.

yogiben avatar Jan 09 '15 18:01 yogiben

I tested my schema with Autoform and it works like a charm. When I use it with yogiben:admin it crashes.

Have you tested a schema using unique constraints?

Obiwarn avatar Jan 13 '15 13:01 Obiwarn

I have not. I can't see why it would be an issue.

Sorry, I don't have any advice at this time.

yogiben avatar Jan 23 '15 19:01 yogiben

I'm having the same problem:

Schemas.Posts = new SimpleSchema
  slug:
    type: String
    max: 60
    index: 1
    unique: true

As soon as I try to set a non unique slug I get the following:

W20150222-15:06:14.769(10)? (STDERR)
W20150222-15:06:14.771(10)? (STDERR) /Users/1pxsolid/.meteor/packages/meteor-tool/.1.0.40.1to9jkn++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:173
W20150222-15:06:14.771(10)? (STDERR)                        throw(ex);
W20150222-15:06:14.772(10)? (STDERR)                              ^
W20150222-15:06:14.772(10)? (STDERR) RangeError: Maximum call stack size exceeded

And my admin and website then crash.

I'm guessing collection2 causes the invalidation, but what happens next might be related to the 'admin' package?

onepixelsolid avatar Feb 22 '15 05:02 onepixelsolid

+1

rwaterman avatar Aug 26 '15 18:08 rwaterman

+1

michellarcari avatar Jul 27 '16 00:07 michellarcari