# "Component was authored using gjs" - but it is not

**URL:** https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736
**Category:** Development
**Created:** [March 18, 2025, 11:53am UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736 "2025-03-18T11:53:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 18, 2025, 11:53am UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/1 "2025-03-18T11:53:55Z")

</div>

On stable, 3.4.1.

I have this in my plugin

/assets/javascripts/discourse/controllers/user-feedback.js

and then  
/assets/javascripts/discourse/templates/user-feedback.hbs contains

`{{feedback-stream stream=this.model}}`

And then these files:

```plaintext
/assets/javascripts/discourse/components/feedback-stream.js
/assets/javascripts/discourse/templates/components/feedback-stream.hbs

```

This was is the error I am getting in my browser console.

**/discourse/templates/components/feedback-stream] feedback-stream was authored using gjs and its template cannot be overridden. Ignoring override. For more information on the future of template overrides, see https://meta.discourse.org/t/247487** But, as you can see, it wasn't written using gjs. 

Now I decided to ignore this error for now and continued modernizing the plugin. As soon as I colocated the templates (so `mv templates/components/* components`) the error went away. But the template is still ignored.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 18, 2025, 12:12pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/2 "2025-03-18T12:12:29Z")

</div>

Ok, the pieces of the puzzle seem to be connecting.

The component does

`export default class FeedbackStream extends UserStream {`

and UserStream **is** written using gjs.

The incorrect error message aside, how would I go on modernizing this and getting things back to work?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [March 18, 2025, 12:33pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/3 "2025-03-18T12:33:45Z")

</div>

What is the purpose of your changes? So we can understand the context.

I believe with gjs, you can only rely on plugin outlets. 🤔

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 18, 2025, 12:51pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/4 "2025-03-18T12:51:19Z")

</div>

The purpose of my current changes is getting the plugin back to work on latest stable 🙂

The purpose of this specific part of the plugin is to show feedback on a users profile page, while heavily reusing existing components.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 18, 2025, 1:03pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/5 "2025-03-18T13:03:14Z")

</div>

If you use gjs for your FeedbackStream, then I think it should work. So it would be something like

```gjs
export default class FeedbackStream extends UserStream {
  <template>
    Your custom template here 
  </template>
}

```

I think mixing hbs/gjs in the same component inheritance chain is unlikely to work too well.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 18, 2025, 1:20pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/6 "2025-03-18T13:20:46Z")

</div>

BTW @Arkshine I see your 🤯 - so just clarifying here. Template overrides are deprecated, regardless of the original authoring format. We’ll be removing them completely in the next few months. For those cases, you’re 100% right that Plugin Outlets are the solution.

But what @RGJ is doing here is not a template override, it’s using Ember’s component inheritance system. Instead of doing

```plaintext
class Foo extends Component

```

you can do

```plaintext
class Foo extends SomeOtherComponent

```

In that case, your component will inherit the template of SomeOtherComponent, or you can choose to replace the template yourself. Your template replacement only applies to `Foo`, and won’t affect the parent `SomeOtherComponent`.

This kind of inheritance is a fairly seldom-used feature though. We tend to lead towards “composition” instead, where you wrap components in each-other within a template. (e.g. that’s how `DModal` is used)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [March 18, 2025, 1:26pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/7 "2025-03-18T13:26:15Z")

</div>

Oh, I see; thanks for clarifying! I failed to see the inheritance here. It makes sense.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 18, 2025, 4:23pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/8 "2025-03-18T16:23:15Z")

</div>

Thank you for the quick help and clear explanation David!

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [April 17, 2025, 4:23pm UTC](https://meta.discourse.org/t/component-was-authored-using-gjs-but-it-is-not/357736/9 "2025-04-17T16:23:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
