mpowaga / meteor-autoform-summernote

https://atmospherejs.com/mpowaga/autoform-summernote
25 stars 18 forks source link

Invalid definition for content field #34

Closed JulianKingman closed 8 years ago

JulianKingman commented 8 years ago

I have a field named content, with the following definition, and for a reason I can't quite understand, I'm getting this field definition error.

content: {
        type: String,
        afFieldInput: {
            type: 'summernote',
            class: 'editor', // optional
            settings: {}// summernote options goes here
        }
    }

and the error:

W20160731-17:16:41.382(-4)? (STDERR) Error: Invalid definition for content field.
W20160731-17:16:41.382(-4)? (STDERR)     at packages/aldeed_simple-schema/simple-schema.js:457:1
W20160731-17:16:41.382(-4)? (STDERR)     at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
W20160731-17:16:41.383(-4)? (STDERR)     at [object Object].SimpleSchema (packages/aldeed_simple-schema/simple-schema.js:454:1)
W20160731-17:16:41.383(-4)? (STDERR)     at meteorInstall.collections.pages.js (collections/pages.js:3:17)
W20160731-17:16:41.383(-4)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160731-17:16:41.384(-4)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
W20160731-17:16:41.384(-4)? (STDERR)     at i18n/en.i18n.json:14:1
W20160731-17:16:41.384(-4)? (STDERR)     at /Users/Julian/Google Drive/Meteor/beyond-words/.meteor/local/build/programs/server/boot.js:297:10
W20160731-17:16:41.385(-4)? (STDERR)     at Array.forEach (native)
W20160731-17:16:41.385(-4)? (STDERR)     at Function._.each._.forEach (/Users/Julian/.meteor/packages/meteor-tool/.1.4.0.1779qjh++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
=> Exited with code: 1                        
=> Your application is crashing. Waiting for file change.

I'm looking for ideas on why this may be happening.

JulianKingman commented 8 years ago

I see the problem, I didn't wrap afFieldInput in autoform, like so:

content: {
        type: String,
        autoform: {
            afFieldInput: {
                type: 'summernote',
                class: 'editor', // optional
                settings: {}// summernote options goes here
            }
        }
    }