Comments (6)
When exporting, this happens (for the shown test course):
{"name":"TypeError","message":"Cannot read property 'exportJSON' of null","stack":"TypeError: Cannot read property 'exportJSON' of null\n at Unit_1.Unit.findById.then (/usr/src/app/models/Lecture.js:61:29)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)"}
When duplicating, this happens:
{"name":"InternalServerError","message":"Failed to duplicate course","stack":"Error\n at InternalServerError.HttpError [as constructor] (/usr/src/app/node_modules/routing-controllers/http-error/HttpError.js:27:23)\n at new InternalServerError (/usr/src/app/node_modules/routing-controllers/http-error/InternalServerError.js:20:28)\n at DuplicationController.<anonymous> (/usr/src/app/controllers/DuplicationController.js:39:34)\n at Generator.throw (<anonymous>)\n at rejected (/usr/src/app/controllers/DuplicationController.js:17:65)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)\nCaused by: Cannot read property 'exportJSON' of null\nTypeError: Cannot read property 'exportJSON' of null\n at Unit_1.Unit.findById.then (/usr/src/app/models/Lecture.js:61:29)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)"}
from geli.
okay, just figured out the reason for this error. this Course contains some lectures which didn't got deleted cleanly.
Should be the same error for #183
from geli.
Added criteria in the session on 2017-11-30:
- Remove enroll key, whitelist and "active" flag in the export
from geli.
Closed by #419
from geli.
When I try to imort the course https://staging.geli.fbi.h-da.de/course/59fa100662fa9c00060bb3d2 (which I previously exported to the following JSON file, I get an error).
Dritter-Kurs-von-David.json.log
{"name":"InternalServerError","message":"Failed to import course","stack":"Error\n at InternalServerError.HttpError [as constructor] (/usr/src/app/node_modules/routing-controllers/http-error/HttpError.js:27:23)\n at new InternalServerError (/usr/src/app/node_modules/routing-controllers/http-error/InternalServerError.js:20:28)\n at Object.<anonymous> (/usr/src/app/models/Course.js:152:30)\n at Generator.throw (<anonymous>)\n at rejected (/usr/src/app/models/Course.js:5:65)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)\nCaused by: Failed to import lecture\nError\n at InternalServerError.HttpError [as constructor] (/usr/src/app/node_modules/routing-controllers/http-error/HttpError.js:27:23)\n at new InternalServerError (/usr/src/app/node_modules/routing-controllers/http-error/InternalServerError.js:20:28)\n at Object.<anonymous> (/usr/src/app/models/Lecture.js:92:30)\n at Generator.throw (<anonymous>)\n at rejected (/usr/src/app/models/Lecture.js:5:65)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)\nCaused by: Failed to import unit of type file\nError\n at InternalServerError.HttpError [as constructor] (/usr/src/app/node_modules/routing-controllers/http-error/HttpError.js:27:23)\n at new InternalServerError (/usr/src/app/node_modules/routing-controllers/http-error/InternalServerError.js:20:28)\n at Object.<anonymous> (/usr/src/app/models/units/Unit.js:82:30)\n at Generator.throw (<anonymous>)\n at rejected (/usr/src/app/models/units/Unit.js:5:65)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)\nCaused by: file validation failed: fileUnitType: Path
fileUnitTypeis required.\nValidationError: file validation failed: fileUnitType: Path
fileUnitType is required.\n at new ValidationError (/usr/src/app/node_modules/mongoose/lib/error/validation.js:28:11)\n at model.Document.invalidate (/usr/src/app/node_modules/mongoose/lib/document.js:1675:32)\n at /usr/src/app/node_modules/mongoose/lib/document.js:1547:17\n at validate (/usr/src/app/node_modules/mongoose/lib/schematype.js:784:7)\n at /usr/src/app/node_modules/mongoose/lib/schematype.js:829:11\n at Array.forEach (<anonymous>)\n at SchemaString.SchemaType.doValidate (/usr/src/app/node_modules/mongoose/lib/schematype.js:789:19)\n at /usr/src/app/node_modules/mongoose/lib/document.js:1545:9\n at _combinedTickCallback (internal/process/next_tick.js:131:7)\n at process._tickDomainCallback (internal/process/next_tick.js:218:9)"}
from geli.
Its the bsontype= "ObjectId" which leads to failures. This contains all Courses which have fileunits and all courses that contain references in the Mediamanager. Also, some Courses have leftover References in the "media" section (on export in the json) but none visible in the GUI.
Also, the concept of just referencing Media files seems a bit problmatic in some aspects. Maybe we shouldnt be able to export media-units for now. Or on Import, we should just create "empty" file units with description and the name as placeholder.
from geli.
Related Issues (20)
- Jump To Top Button HOT 2
- Bug: Styling in pdf HOT 1
- List/Grid View Component
- Sticky Header Course-View HOT 1
- 🐛 BUG: ProgressController vulnerabilities
- 🐛 BUG: UnitController vulnerabilities
- 🐛 BUG: WhitelistController vulnerabilities
- 🐛 BUG: MediaController vulnerabilities
- Bug: add svg as course image
- Bug: video upload, not all files visibile
- Layout: tasks - long answers are not wrapped
- Feedback wrong answers in tasks
- Update contributors list
- Correct CHANGELOG.md
- Bug: notification bell messages move out of screen while scrolling down the page
- How to test the Demo site?
- Know when user finish a course
- Is this repo still active? HOT 1
- default admin account? HOT 1
- Build for production
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geli.