-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Hi,
We get a strange error, which looks like an internal error, while deleting and object with Formage.
Here's what I do:
- Login to Formage using valid user and password
- Choose object type, in our case for example Users
- Choose an object, i .e. one of the users
- Click delete and confirm
- A message "error" with no additional details is displayed (screenshots attached below). Server output is:
[18:16:51] [server] error: TypeError: Cannot read property 'map' of undefined
at _map (/home/filip/Projects/x/node_modules/formage/node_modules/async/lib/async.js:54:16)
at _asyncMap (/home/filip/Projects/x/node_modules/formage/node_modules/async/lib/async.js:237:15)
at Object.map (/home/filip/Projects/x/node_modules/formage/node_modules/async/lib/async.js:219:23)
at Object.modelConfig.actions.push.func (/home/filip/Projects/x/node_modules/formage/lib/registry.js:220:19)
at actionDocuments (/home/filip/Projects/x/node_modules/formage/lib/controllers.js:219:40)
at Layer.handle [as handle_request] (/home/filip/Projects/x/node_modules/formage/node_modules/express/lib/router/layer.js:76:5)
at next (/home/filip/Projects/x/node_modules/formage/node_modules/express/lib/router/route.js:100:13)
at afterParseSession (/home/filip/Projects/x/node_modules/formage/lib/controllers.js:531:32)
at in_the_handler (/home/filip/Projects/x/node_modules/formage/node_modules/mpromise/lib/promise.js:238:18)
at process._tickCallback (node.js:419:13)
The error occurs for any of the models.
We're stuck with this error and will appreciate your help. How can we eliminate this error?
We have noticed that Formage uses socket.io internally. We have our own socket.io server running on the same machine -- can this be the reason of the problem?
Environment
- Mongo server is set up locally on the machine
- Formage is set up using:
import formage = require("formage");
import express = require("express");
var options = {
title: "Admin Panel",
root: "/admin",
default_section: "main",
username: "admin",
password: "password",
admin_users_gui: true
};
formage.init(app, express, app.getModels(), options);
// getModels() is our mix-in which returns the models in the app
- Example schema:
var documentSchema = new mongoose.Schema({
definitionId: { type: Number },
userName: { type: String, index: true },
state: { type: Number, enum: [DocumentState.Started, DocumentState.Finished] },
data: mongoose.Schema.Types.Mixed
});
Attachments
Metadata
Metadata
Assignees
Labels
No labels

