Giter Club home page Giter Club logo

Comments (6)

d89 avatar d89 commented on July 21, 2024

When exporting, this happens (for the shown test course):

image

{"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:

image

{"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.

khase avatar khase commented on July 21, 2024

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.

d89 avatar d89 commented on July 21, 2024

Added criteria in the session on 2017-11-30:

  • Remove enroll key, whitelist and "active" flag in the export

from geli.

lkskrt avatar lkskrt commented on July 21, 2024

Closed by #419

from geli.

d89 avatar d89 commented on July 21, 2024

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: PathfileUnitType 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.

HPunktOchs avatar HPunktOchs commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.