rbrlortie
(Kara L.)
9. Oktober 2018 um 14:33
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 „Gefällt mir“
Do you mean from a customization or plugin, or are you referring to a plain vanilla install?
rbrlortie
(Kara L.)
9. Oktober 2018 um 17:34
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)
9. Oktober 2018 um 17:46
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.)
9. Oktober 2018 um 17:51
5
pmusaraj
(Penar Musaraj)
9. Oktober 2018 um 17:56
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 „Gefällt mir“
rbrlortie
(Kara L.)
9. Oktober 2018 um 18:35
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
10. Oktober 2018 um 13:09
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 „Gefällt mir“
rbrlortie
(Kara L.)
10. Oktober 2018 um 13:57
13
Awesome! We are awaiting your go to update our instance.
2 „Gefällt mir“
xrav3nz
11. Oktober 2018 um 05:58
14
The fix is in test-passed
Feel free to update anytime now. Thanks again!
7 „Gefällt mir“
xrav3nz
Geschlossen,
15. Oktober 2018 um 10:00
17
This topic was automatically closed after 4 days. New replies are no longer allowed.