# JS plugins not loading correctly

**URL:** <https://meta.discourse.org/t/js-plugins-not-loading-correctly/99105>\
**Category:** Bug\
**Created:** [October 9, 2018, 2:33pm UTC](https://meta.discourse.org/t/js-plugins-not-loading-correctly/99105 "2018-10-09T14:33:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rbrlortie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rbrlortie/32/166740_2.png) [@rbrlortie](https://meta.discourse.org/u/rbrlortie)\
**Post date:** [October 9, 2018, 2:33pm UTC](https://meta.discourse.org/t/js-plugins-not-loading-correctly/99105/1 "2018-10-09T14:33:28Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/e/ae20dae2efea4e82e9f15c5174b0270ed00503f5.png)

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](https://github.com/discourse/discourse/compare/b5bdd42838aa5401dedb7bc7d1548c8888d95b5f...tests-passed)

Does anyone have a clue as to why this might happen or steps to debug this? Thanks!

---

_[View the full topic](https://meta.discourse.org/t/js-plugins-not-loading-correctly/99105)._
