# \[管理员通知\] 您的某个主题或插件包含需要更新的代码。（id:discourse.html-safe-helper）

**URL:** <https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553>\
**Category:** Support\
**Created:** [2026年八月20日 17:02 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553 "2026-08-20T17:02:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbos](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rbos](https://meta.discourse.org/u/rbos)\
**Post date:** [2026年八月20日 17:02 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/1 "2026-08-20T17:02:27Z")

</div>

我们一直在收到警告 [subject]，我不清楚它来自哪里。

控制台中有一个类似的错误：

DEPRECATION NOTICE: 来自 ‘discourse/helpers/html-safe’ 的 `htmlSafe` 已弃用。请改用来自 ‘@ember/template’ 的 `trustHTML`。[自 Discourse 2026.3.0 起弃用] [弃用 ID: discourse.html-safe-helper]

我在插件和主题文件夹中搜索了 “htmlSafe”；唯一包含它的活动插件是 “docker\_manager”，我认为我已经禁用了它（删除了 plugins/docker\_manager，并移除了 config/official\_plugins.json 中的相关条目）。

但仍然收到错误。我还应该在哪里查找？

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2026年八月20日 19:25 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/2 "2026-08-20T19:25:19Z")

</div>

应该会有一个指向导致错误的主题组件的链接。Discourse\_docker 并不是问题所在。

> [@rbos](#):
>
> 我在插件和主题文件夹中搜索了“htmlSafe”；

我不太明白你在说什么；主题存储在数据库中，而不是文件系统里，所以你无法通过那种方式搜索它们。如果你分享你的论坛 URL（且该论坛不需要登录即可访问），应该会有人能够帮助你找到它。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2026年八月20日 20:06 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/3 "2026-08-20T20:06:34Z")

</div>

> [@pfaffman](#):
>
> 应该有一个指向导致该错误的主题组件的链接。

我认为没有这样的链接。由于 @rbos 之前的一则帖子，我查看了 [https://forum.pkp.sfu.ca/，并在浏览器控制台中注意到以下内容：](https://forum.pkp.sfu.ca/%EF%BC%8C%E5%B9%B6%E5%9C%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E6%8E%A7%E5%88%B6%E5%8F%B0%E4%B8%AD%E6%B3%A8%E6%84%8F%E5%88%B0%E4%BB%A5%E4%B8%8B%E5%86%85%E5%AE%B9%EF%BC%9A)

```plaintext
80b72542d6.css:1 Failed to load resource: the server responded with a status of 403 ()
deprecated.js:54 [THEME 14 'Versatile Banner'] DEPRECATION NOTICE: The file 'theme-14/discourse/components/versatile-banner-column.hbs' uses the deprecated .hbs extension. Refactor it to use '.gjs' instead. [deprecation id: discourse.hbs-extension] [info: https://meta.discourse.org/t/398896]
deprecated @ deprecated.js:54
deprecated.js:54 [THEME 14 'Versatile Banner'] DEPRECATION NOTICE: The file 'theme-14/discourse/components/versatile-banner.hbs' uses the deprecated .hbs extension. Refactor it to use '.gjs' instead. [deprecation id: discourse.hbs-extension] [info: https://meta.discourse.org/t/398896]
deprecated @ deprecated.js:54
deprecate.js:106 DEPRECATION: Importing `inject` from `@ember/service` is deprecated. Please import `service` instead. [deprecation id: importing-inject-from-ember-service] This will be removed in ember-source 7.0.0. See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.
    at deprecate.js:90:19
    at re.<computed> (handlers.js:10:7)
    at deprecate.js:116:7
    at re.<computed> (handlers.js:10:7)
    at dae (index.js:75:7)
    at index.js:12:5
    at re.<computed> (handlers.js:10:7)
    at fae (index.js:115:3)
    at re.<computed> (handlers.js:10:7)
(anonymous) @ deprecate.js:106
deprecate.js:106 DEPRECATION: Importing `inject` from `@ember/service` is deprecated. Please import `service` instead. [deprecation id: importing-inject-from-ember-service] This will be removed in ember-source 7.0.0. See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.
    at deprecate.js:90:19
    at re.<computed> (handlers.js:10:7)
    at deprecate.js:116:7
    at re.<computed> (handlers.js:10:7)
    at dae (index.js:75:7)
    at index.js:12:5
    at re.<computed> (handlers.js:10:7)
    at fae (index.js:115:3)
    at re.<computed> (handlers.js:10:7)
(anonymous) @ deprecate.js:106
deprecate.js:106 DEPRECATION: Importing `inject` from `@ember/service` is deprecated. Please import `service` instead. [deprecation id: importing-inject-from-ember-service] This will be removed in ember-source 7.0.0. See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.
    at deprecate.js:90:19
    at re.<computed> (handlers.js:10:7)
    at deprecate.js:116:7
    at re.<computed> (handlers.js:10:7)
    at dae (index.js:75:7)
    at index.js:12:5
    at re.<computed> (handlers.js:10:7)
    at fae (index.js:115:3)
    at re.<computed> (handlers.js:10:7)
(anonymous) @ deprecate.js:106
app.js:367 ℹ️ Discourse v2026.8.0-latest.1 — https://github.com/discourse/discourse/commits/7df32723f1 — Ember v6.10.1
deprecated.js:54 DEPRECATION NOTICE: `htmlSafe` from 'discourse/helpers/html-safe' is deprecated. Use `trustHTML` from '@ember/template' instead. [deprecated since Discourse 2026.3.0] [deprecation id: discourse.html-safe-helper]
deprecated @ deprecated.js:54
deprecated.js:54 DEPRECATION NOTICE: `htmlSafe` from 'discourse/helpers/html-safe' is deprecated. Use `trustHTML` from '@ember/template' instead. [deprecated since Discourse 2026.3.0] [deprecation id: discourse.html-safe-helper]
deprecated @ deprecated.js:54
deprecated.js:54 DEPRECATION NOTICE: `htmlSafe` from 'discourse/helpers/html-safe' is deprecated. Use `trustHTML` from '@ember/template' instead. [deprecated since Discourse 2026.3.0] [deprecation id: discourse.html-safe-helper]
deprecated @ deprecated.js:54
80b72542d6.css:1 Failed to load resource: the server responded with a status of 403 ()
Node cannot be found in the current page.

```

我无法找到关于哪个组件导致此消息的详细信息。不过，从 versatile banner 开始排查可能是一个好主意。

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2026年八月20日 20:56 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/4 "2026-08-20T20:56:24Z")

</div>

> [@Moin](#):
>
> `THEME 14 'Versatile Banner']`

我想这不是一个链接，但意思很清楚。我觉得你只需要获取最新版本就行了。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2026年八月20日 21:01 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/5 "2026-08-20T21:01:55Z")

</div>

你能告诉我为什么这是显而易见的吗？我清楚地看到它导致了 hbs 文件的弃用提示。但我并没有看到任何指标表明它会触发关于 html-safe 的提示。虽然一个过时的组件似乎也可能导致其他提示，但我们怎么知道没有其他组件在引起那个提示呢？

---

<div class="post-metadata">

**Author:** ![rbos](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rbos](https://meta.discourse.org/u/rbos)\
**Post date:** [2026年八月20日 23:37 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/6 "2026-08-20T23:37:09Z")

</div>

奇怪。在 Docker 容器中的 Discourse 文件夹里执行 `find` 命令，并没有找到 “theme-14” 目录。我不知道它到底是从哪里被加载进来的。我当然看到了那些弃用警告，但其中只有上面提到的那一条涉及 “html-safe”。

---

<div class="post-metadata">

**Author:** ![rbos](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rbos](https://meta.discourse.org/u/rbos)\
**Post date:** [2026年八月20日 23:39 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/7 "2026-08-20T23:39:15Z")

</div>

它竟然存储在数据库里，这确实很有意思，谢谢。我对 Discourse 并不太熟悉，之前一直以为主题文件是存放在文件系统里的。

这种软件我一年也就碰上一次，甚至更少。🙂

（话说清楚一点，我非常感激 Discourse 一直以来（基本上）坚如磐石的稳定性！正因为我变得这么不熟悉它，反而证明了你们的工作做得出色。我越是熟悉的软件，往往就越容易让我生气！）

---

<div class="post-metadata">

**Author:** ![rbos](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rbos](https://meta.discourse.org/u/rbos)\
**Post date:** [2026年八月20日 23:42 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/8 "2026-08-20T23:42:15Z")

</div>

更新：我进入论坛管理后台，搜索“versatile”后找到了该组件，并在那里完成了更新，之后提示信息就消失了。

感谢大家的帮助。

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2026年八月23日 09:56 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/9 "2026-08-23T09:56:18Z")

</div>

有一个设置项，可以在升级时自动更新。

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2026年九月22日 09:57 UTC](https://meta.discourse.org/t/admin-notice-one-of-your-themes-or-plugins-contains-code-which-needs-updating-id-discourse-html-safe-helper/410553/10 "2026-09-22T09:57:15Z")

</div>

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