# 我的“组件”模板坏了。我该如何修复？

**URL:** https://meta.discourse.org/t/templating-of-my-component-broke-how-do-i-fix-it/398553
**Category:** Development
**Created:** [2026年三月16日 16:59 UTC](https://meta.discourse.org/t/templating-of-my-component-broke-how-do-i-fix-it/398553 "2026-03-16T16:59:41Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2026年三月16日 17:11 UTC](https://meta.discourse.org/t/templating-of-my-component-broke-how-do-i-fix-it/398553/7 "2026-03-16T17:11:59Z")

</div>

所以，我认为带有 `setupComponent` 的 `registerConnectorClass` 已被弃用，请看您的错误日志：

`DEPRECATION NOTICE: Defining connector classes via registerConnectorClass is deprecated. See https://meta.discourse.org/t/32727 for more modern patterns. [deprecation id: discourse.register-connector-class-legacy] chunk.f47b6dc1cc59c827db42.d41d8cd9.js:134:74065`

而且我也不确定我们是否仍然允许使用原始 HTML，就像在您的页脚组件中那样。

因此，这个组件将不得不重构以适应现代模式，我建议将其移动到一个合适的组件中，而不是像现在这样放在“管理”（Admin）下面。

回答您的另一个问题

> [@das-g](#):
>
> 根本性的改变是什么，我是否错过了任何关于它的通知？

这是由于持续的使 Discourse 现代化并采用 Glimmer 组件的新现代标准的工作所致。

---

_[View the full topic](https://meta.discourse.org/t/templating-of-my-component-broke-how-do-i-fix-it/398553)._
