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

Missing JS dependencies when loading unit problem #336

Open
mariajgrimaldi opened this issue Feb 10, 2023 · 2 comments
Open

Missing JS dependencies when loading unit problem #336

mariajgrimaldi opened this issue Feb 10, 2023 · 2 comments

Comments

@mariajgrimaldi
Copy link

Description

We were having the following error when loading a unit with an SGA block in the LMS:
image

Generating all sorts of errors like:

The grade submission button didn’t work
Files weren’t being uploaded

Read the whole issue here: https://discuss.openedx.org/t/edx-sga-fileupload-is-not-a-function-when-using-cloudfront-for-statics/9270

How to reproduce

We tried reproducing this error in two installations, one that used Cloudfront and the other that didn’t. The error only occurred when using CloudFront to serve static files. After extensive research, we found that CloudFront wasn’t caching the statics, increasing the loading times. So when rendering the unit page, files required by SGA for uploading files like:

https://cloudfront-url/static/js/vendor/jQuery-File-Upload/js/jquery.fileupload.js
https://cloudfront-url/static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport.js

Weren’t being loaded in time. Therefore, fileupload is not a function.

Suggestions

Branden's suggestion on the blog post resounded with me, we could try to make this xblock more self-contained. What do you folks think?

@arslanashraf7
Copy link

@Anas12091101 Could you take a look at this?

@Anas12091101 Anas12091101 self-assigned this Sep 25, 2024
@Anas12091101
Copy link

Anas12091101 commented Oct 8, 2024

@arslanashraf7 I tried setting up S3 and CloudFront in edx-platform for static assets, but not all the assets seem to be uploaded to S3, and the collectstatic command was throwing some errors. I then used https://github.com/hastexo/tutor-contrib-s3, and it seemed to work, but the issue might take some more time to fully resolve (approximately 2-3 days).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants