rbrlortie
(Kara L.)
October 9, 2018, 2:33pm
1
Hi,
Since last week or so my discourse is having trouble loading JS plugins.
What is strange is that they are indeed loaded correctly in the Network tab:
I am getting errors such as
TypeError: e.find(...).not(...).magnificPopup is not a function
TypeError: window.Chart is not a constructor
It seems that stuff getting loaded via loadScript("/javascripts/jquery.magnific-popup.min.js")
are not loading correctly.
Discourse version: v2.2.0.beta2 +184
Does anyone have a clue as to why this might happen or steps to debug this? Thanks!
1 Like
Do you mean from a customization or plugin, or are you referring to a plain vanilla install?
rbrlortie
(Kara L.)
October 9, 2018, 5:34pm
3
The front-end should be vanilla except for two script inclusions that aren’t causing errors.
Core features like the /admin
dashboard charts aren’t displaying.
pmusaraj
(Penar Musaraj)
October 9, 2018, 5:46pm
4
Is this on your local environment or on a live site? Also, can you confirm that you have the Chart.min.js
and jQuery.magnific-popup.min.js
in the /public/javascripts/
folder?
rbrlortie
(Kara L.)
October 9, 2018, 5:51pm
5
pmusaraj
(Penar Musaraj)
October 9, 2018, 5:56pm
6
Hmm, interesting. There are no images in the topic you linked above, so I don’t see what’s triggering the magnificPopup call.
1 Like
rbrlortie
(Kara L.)
October 9, 2018, 6:35pm
7
I am looking at our previous stable environment and it seems that those issue might have started to appear when we moved from: Discourse 2.1.0.beta4 -> Discourse 2.2.0.beta2
xrav3nz
October 10, 2018, 1:09pm
12
Hey @rbrlortie , a recent change to loadScript
is not working as expected for subfolder installs, but I have identified the issue and submitted a fix.
Thanks for the report, and I will let you know when it’s ready for update!
PR for reference:
https://github.com/discourse/discourse/pull/6474
8 Likes
rbrlortie
(Kara L.)
October 10, 2018, 1:57pm
13
Awesome! We are awaiting your go to update our instance.
2 Likes
xrav3nz
October 11, 2018, 5:58am
14
The fix is in test-passed
Feel free to update anytime now. Thanks again!
7 Likes
xrav3nz
Closed
October 15, 2018, 10:00am
17
This topic was automatically closed after 4 days. New replies are no longer allowed.