orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Error: You must pass Tabular.Table instance as the table attribute #448

Closed JulianKingman closed 7 years ago

JulianKingman commented 7 years ago

I'm trying to set up a collection to be viewed in the admin interface, and I get this error: Error: You must pass Tabular.Table instance as the table attribute Any ideas on how to debug this? The collection appears blank. The accounts collection works just fine. Here's how I declare the collection, which I have just sitting in the /collections folder (how do I initialize the collections if I want to put them in the imports folder?).

 import {scorpius} from 'meteor/scorpiusjs:core';
 import {SimpleSchema} from 'meteor/aldeed:simple-schema';

 const Contestants = new scorpius.collection('contestants', {
   singularName: 'contestant', // The name of one of these items
   pluralName: 'contestants', // The name of more than one of these items
   title: 'contestants', // The title in the index of the collection
   link: {
     /**
      * The text that you want to show in the sidebar.
      * The default value is the name of the collection, so
      * in this case it is not necessary.
      */
     title: 'Contestants',
     tabular: {
       columns: [
         {data: 'name', title: 'Name'},
       ],
     },
   },
 });

Contestants.attachSchema(new SimpleSchema({
  name: {type: String, label: "Name"},
  avatarUri: {type: String, label: "Avatar Image URL"},
}));
JulianKingman commented 7 years ago

Packages:

accounts-facebook                  1.1.0  Login service for Facebook accounts
aldeed:collection2                 2.10.0  Automatic validation of insert and update operations on the client and server.
aldeed:simple-schema               1.5.3  A simple schema validation object with reactivity. Used by collection2 and autoform.
autopublish                        1.0.7  (For prototyping only) Publish the entire database to all clients
blaze-html-templates               1.1.0  Compile HTML templates into reactive UI with Meteor Blaze
ecmascript                         0.6.3  Compiler plugin that supports ES2015+ in all .js files
email                              1.1.18  Send email messages
es5-shim                           4.6.15  Shims and polyfills to improve ECMAScript 5 support
insecure                           1.0.7  (For prototyping only) Allow all database writes from the client
jagi:astronomy                     2.4.0  Model layer for Meteor
jagi:astronomy-timestamp-behavior  2.0.0  Timestamp behavior for Meteor Astronomy
jquery                             1.11.10  Manipulate the DOM using CSS selectors
kadira:blaze-layout                2.3.0  Layout Manager for Blaze (works well with FlowRouter)
kadira:flow-router                 2.12.1  Carefully Designed Client Side Router for Meteor
meteor-base                        1.0.4  Packages that every Meteor app needs
mobile-experience                  1.0.4  Packages for a great mobile user experience
mongo                              1.1.15  Adaptor for using MongoDB and Minimongo over DDP
reactive-var                       1.0.11  Reactive variable
scorpiusjs:core                    0.3.1  A framework that makes complex as well as simple apps possible with minimal effort
scorpiusjs:image-attribute         0.3.1  Image attribute for scorpius
scorpiusjs:materialize             0.3.1_1  Materialize theme for scorpius admin
service-configuration              1.0.11  Manage the configuration for third-party services
shell-server                       0.2.2  Server-side component of the `meteor shell` command.
standard-minifier-css              1.3.3  Standard css minifier used with Meteor apps by default.
standard-minifier-js               1.2.2  Standard javascript minifiers used with Meteor apps by default.
tracker                            1.1.2  Dependency tracker to allow reactive callbacks
JulianKingman commented 7 years ago

Had tabular nested at the wrong level.