ignacy130 / yadmin

A complete admin dashboard solution
https://atmospherejs.com/ignacy130/yadmin
GNU General Public License v3.0
11 stars 2 forks source link

Exception in template helper: TypeError: Cannot convert undefined or null to object #6

Open krishaamer opened 6 years ago

krishaamer commented 6 years ago

Hey @ignacy130, thanks so much for taking this package under your wing and developing it further!

I've been able to get most of it working after moving away from the Yogiben package however one error remains:

screen shot 2018-04-23 at 01 00 38

When I try to edit a field all the fields show up as objects instead of the actual fields. Have you encountered such an error before?

Here's what I'm using:

accounts-base               1.4.2  A user account system
accounts-password           1.5.1  Password support for accounts
alanning:roles              1.2.16  Authorization package for Meteor
aldeed:autoform             6.3.0  Easily create forms with automatic insert and update, and automatic reactive validation.
aldeed:collection2          3.0.0  Automatic validation of Meteor Mongo insert and update operations on the client and server
aldeed:schema-index         3.0.0  Control some MongoDB indexing with schema options
blaze-html-templates        1.1.2  Compile HTML templates into reactive UI with Meteor Blaze
check                       1.3.1  Check whether a value matches a pattern
dburles:collection-helpers  1.1.0  Transform your collections with helpers that you define
ecmascript                  0.10.7  Compiler plugin that supports ES2015+ in all .js files
fortawesome:fontawesome     4.7.0  Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly
ignacy130:yadmin            2.0.0  Simple and easy to use admin panel, continuation of yogiben-meteor:admin. Works with Meteor 1.5.
iron:router                 1.1.2  Routing specifically designed for Meteor
meteor-base                 1.3.0  Packages that every Meteor app needs
mobile-experience           1.0.5  Packages for a great mobile user experience
mongo                       1.4.7  Adaptor for using MongoDB and Minimongo over DDP
reactive-var                1.0.11  Reactive variable
session                     1.1.7  Session variable
shell-server                0.3.1  Server-side component of the `meteor shell` command.
standard-minifier-css       1.4.1  Standard css minifier used with Meteor apps by default.
standard-minifier-js        2.3.3  Standard javascript minifiers used with Meteor apps by default.
todda00:friendly-slugs      0.6.0  Generate URL friendly slugs from a field with auto-incrementation to ensure unique URLs.
tracker                     1.1.3  Dependency tracker to allow reactive callbacks
twbs:bootstrap              3.3.6  The most popular front-end framework for developing responsive, mobile first projects on the web.
underscore                  1.0.10  Collection of small helpers: _.map, _.each, ...
useraccounts:bootstrap      1.14.2  Accounts Templates styled for Twitter Bootstrap.
useraccounts:core           1.14.2  Meteor sign up and sign in templates core package.
useraccounts:iron-routing   1.14.2  UserAccounts package providing routes configuration capability via iron:router.

EDIT:

I went through your npm-shrinkwrap.json and tried npm simpl-schema@0.3.2 instead of the simpl-schema@1.5.0 I was using and this made it work. So I guess something has broken since..

ignacy130 commented 6 years ago

Hmm, this looks familiar, but I think it's rather question of autoform package and proper fields configuration. As I remember correctly, this happens when autoform doesn't know which editor to use. Have you checked it this way?

@krishaamer so downgrading simpl-schema worked? Not a good information, but helpful

krishaamer commented 6 years ago

Yep, there's a lot of versions of simpl-schema between these two which I didn't check but using @0.3.2 works fine for the past 2 days.

uaimax commented 6 years ago

Are you sure that you gave permission? eg:.

Pages.allow({
    insert: function (userId, doc) {
        return false;
    },

    update: function (userId, doc, fields, modifier) {
        return false;
    },

    remove: function (userId, doc) {
        return false;
    }
});