# Plugin not loaded when route not found

**URL:** https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265
**Category:** Development
**Created:** [August 1, 2017, 7:06pm UTC](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265 "2017-08-01T19:06:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)
#### Post date: [August 1, 2017, 7:06pm UTC](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265/1 "2017-08-01T19:06:15Z")

</div>

Whenever I start Discourse on an unknown route (such as `https://www.mydiscourse.org/tag/zzz` where `zzz` is a tag that doesn’t exist), my plugin doesn’t load. Is this the intended behavior? If it is, is there something I can do so that my plugin is always loaded?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 1, 2017, 7:13pm UTC](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265/2 "2017-08-01T19:13:48Z")

</div>

The error page is a plain HTML page, we don’t load the Javascript app there, so no Ember, JQuery, plugins, etc.

---

<div class="post-metadata">

### Author: ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)
#### Post date: [August 1, 2017, 7:34pm UTC](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265/3 "2017-08-01T19:34:16Z")

</div>

Thanks @Falco.

I’ve just discovered that is is not as simple as initially noticed.

This is what I get on my Discourse dev instance:

- For an URL that doesn’t match any route, I get the rail “routing error” page (like [this one](https://i.stack.imgur.com/LteAj.png)) and my plugin is not loaded.
- For `https://www.mydiscourse.org/tag/zzz` where `zzz` is a non-existent tag, I get the [Oops Discourse page](https://meta.discourse.org/zzz) and my plugin is not loaded.
- For `https://www.mydiscourse.org/tag/zzz/notifications` I also get the [Oops Discourse page](https://meta.discourse.org/zzz/notifications), **but my plugin is loaded**.

Does it look like the intended behavior or should I worry about my Discourse dev instance?
