CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Adding a field called 'schema' kills the site #143

Open adam-clarey opened 8 years ago

adam-clarey commented 8 years ago

You cant even restart the server until you manually change the fieldname in the schema json

FilipNest commented 8 years ago

Ha. We need a reserved name list. I'm sure there's one provided by Mongoose. It's basically all the inherent mongoose methods and special types.

FilipNest commented 8 years ago

I tried manually adding a field called schema to the entity type json file and it does error but gracefully, leaving an error in the log. This is what should happen. I think the fault is with the entity type form which is unusable at the moment (can't add a field).

Related: https://github.com/CityWebConsultants/Iris/issues/140

adam-clarey commented 8 years ago

I think that's a different issue, the not being able add add is a simple client side js bug that is adding the slideToggle() twice, if you inspect the css and make the field visible it works fine. Obviously that bug still needs fixing

FilipNest commented 8 years ago

Recreated by:

If anyone wants to investigate it. If it is a reserved words issue it'll be worth compiling a list. Or handling these errors better and not crashing the site until you fix the entity type config. Or both!