Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculateCompletion: Uncaught TypeError: contentObjectModel.get(...) is undefined #568

Open
jonas-jelinski opened this issue Jul 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jonas-jelinski
Copy link

Subject of the issue/enhancement/features

Page doesn't load correctly

Your environment

  • Framework: 5.18.5; AT: 0.10.5
  • Firefox 128.0
  • Notebook, W11

Steps to reproduce

  1. Build course in AT with a lot of videos
  2. Click preview
  3. Wait

Expected behaviour

  1. Page should show the course after a couple of seconds

Actual behaviour

  1. Loading Screen gets stucked
  2. Error Message in console Browser: Uncaught TypeError: contentObjectModel.get(...) is undefined

Details:

PAGE is the page where we host. won't share the name.

Uncaught TypeError: contentObjectModel.get(...) is undefined

calculateCompletion https://PAGE/preview/5f5f651c7ed50a4ba3a8a453/6605685f2542d8da9a66ecce/adapt/js/adapt.min.js:1

calculateCompletion https://PAGE/preview/5f5f651c7ed50a4ba3a8a453/6605685f2542d8da9a66ecce/adapt/js/adapt.min.js:1

calculateCompletion https://PAGE/preview/5f5f651c7ed50a4ba3a8a453/6605685f2542d8da9a66ecce/adapt/js/adapt.min.js:1

calculatePercentageComplete https://PAGE/preview/5f5f651c7ed50a4ba3a8a453/6605685f2542d8da9a66ecce/adapt/js/adapt.min.js:1

onCompletionChange https://PAGE//preview/5f5f651c7ed50a4ba3a8a453/6605685f2542d8da9a66ecce/adapt/js/adapt.min.js

Happens just sometimes.

@oliverfoster
Copy link
Member

I'm assuming it's page level progress oriented.

Starting here at onCompletionChange https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/blob/9c6ec1584d965bdf8517ad3699b043d5812a8a01/js/adapt-contrib-pageLevelProgress.js#L64-L77

Then erroring here https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/blob/9c6ec1584d965bdf8517ad3699b043d5812a8a01/js/completionCalculations.js#L20

There is a pull request for a similar bug which you could try, if you're able.
https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/pull/236/files

Note: In future, when reporting console logs, you need to have first turned on Source Maps in your project settings so that we have source code numbers instead of adapt.min.js:1. adapt.min.js:1 means "line 1 of the minified production code", which is a problem, because everything is line 1 in the minified production code.

@oliverfoster oliverfoster self-assigned this Jul 22, 2024
@oliverfoster oliverfoster added the bug Something isn't working label Jul 22, 2024
@jonas-jelinski
Copy link
Author

Thank you Oliver. I will try that. I think it will fix it.

@oliverfoster
Copy link
Member

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Awaiting Response
Development

No branches or pull requests

2 participants