# Raw plugin outlets not looking in RAW\_TEMPLATES in v1.7.0.beta11

**URL:** https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199
**Category:** Bug
**Created:** [05.Январь.2017 05:08:35 UTC](https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199 "2017-01-05T05:08:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Acshi\_Haggenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/acshi_haggenmiller/32/121323_2.png) [@Acshi\_Haggenmiller](https://meta.discourse.org/u/Acshi_Haggenmiller)
#### Post date: [05.Январь.2017 05:08:35 UTC](https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199/1 "2017-01-05T05:08:35Z")

</div>

I have a raw template in my plugin at assets\javascripts\discourse\templates\connectors\topic-list-tags\template.raw.hbs that is not being inserted into the topic list.

Looking at the new code:  
A raw plugin outlet uses `connectorsFor` to find relevant templates.

> <https://github.com/discourse/discourse/blob/v1.7.0.beta11/app/assets/javascripts/discourse/helpers/raw-plugin-outlet.js.es6>

But since `connectorsFor` just looks in the `_connectorCache` which is only populated from `Ember.TEMPLATES` and not from `Discourse.RAW_TEMPLATES`, it can’t find my template.raw.hbs file.

```
function buildConnectorCache() {
  _connectorCache = {};

  findOutlets(Ember.TEMPLATES, function(outletName, resource, uniqueName) {
    _connectorCache[outletName] = _connectorCache[outletName] || [];

    _connectorCache[outletName].push({
      templateName: resource.replace('javascripts/', ''),
      template: Ember.TEMPLATES[resource],
      classNames: `${outletName}-outlet ${uniqueName}`,
      connectorClass: findClass(outletName, uniqueName)
    });
  });
}

export function connectorsFor(outletName) {
  if (!_connectorCache) { buildConnectorCache(); }
  return _connectorCache[outletName] || [];
}

```

How should this be fixed or am I missing something?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [05.Январь.2017 16:04:42 UTC](https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199/2 "2017-01-05T16:04:42Z")

</div>

Thanks for reporting it. It looks like this slipped through despite me reviewing MANY plugins. I’m working on a fix now.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [05.Январь.2017 16:39:38 UTC](https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199/3 "2017-01-05T16:39:38Z")

</div>

This commit should fix it:

[https://github.com/discourse/discourse/commit/7c8095294d7296f0f27d4cb4066f1555fc8c2cbc](https://github.com/discourse/discourse/commit/7c8095294d7296f0f27d4cb4066f1555fc8c2cbc)

I’ve also included a test to avoid this happening again.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [05.Январь.2017 17:21:36 UTC](https://meta.discourse.org/t/raw-plugin-outlets-not-looking-in-raw-templates-in-v1-7-0-beta11/55199/4 "2017-01-05T17:21:36Z")

</div>


