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

Occasional "'$' is undefined" error in Django template-rendered pages (production) #1138

Closed
gsidebo opened this issue Sep 19, 2019 · 5 comments
Labels
Bug Something isn't working

Comments

@gsidebo
Copy link
Contributor

gsidebo commented Sep 19, 2019

Steps to Reproduce

Not sure. Maybe slow down network connection in console

Expected Behavior

Javascript loads in Django-template-rendered pages

Actual Behavior

Certain scripts are occasionally executed before jQuery loads and $ is defined

Related Issues

Sentry: https://sentry.io/organizations/mit-office-of-digital-learning/issues/1085982154/events/4f28451f15ed4511864212b98b082a6e/?project=1413655

@gsidebo gsidebo added the Bug Something isn't working label Sep 19, 2019
@sentry-io
Copy link

sentry-io bot commented Oct 29, 2019

Sentry issue: XPRO-BT

@asadiqbal08 asadiqbal08 self-assigned this Oct 30, 2019
@asadiqbal08
Copy link
Contributor

Tried to re produce it but still not getting such error locally.

@asadiqbal08
Copy link
Contributor

Is it still a valid bug ? as I tried it many times to generate it.

@gsidebo
Copy link
Contributor Author

gsidebo commented Nov 4, 2019

@asadiqbal08 It's still a valid bug. It was last seen today in production. I don't think we need to worry about reproducing it locally, though you can probably do that by clearing your browser cache and changing your network speed in the developer console. We should just apply some best-practice method for waiting for jQuery to load before executing any code that depends on it. Here's one blog post about that: https://idiallo.com/javascript/async-jquery. There might be a better solution out there but that's a start

@gsidebo
Copy link
Contributor Author

gsidebo commented Dec 2, 2021

This may have been solved as a result of our performance improvements (#2065). Closing.

@gsidebo gsidebo closed this as completed Dec 2, 2021
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
None yet
Development

No branches or pull requests

2 participants