# 尝试使用 @username 功能会导致标签页崩溃

**URL:** https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821
**Category:** Support
**Created:** [2019年五月27日 21:53 UTC](https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821 "2019-05-27T21:53:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anoek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anoek/32/141917_2.png) [@anoek](https://meta.discourse.org/u/anoek)
#### Post date: [2019年五月27日 21:53 UTC](https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821/1 "2019-05-27T21:53:21Z")

</div>

**问题**

自大约两周前更新以来，每当用户尝试通过输入 @用户名 来提及某位用户时，标签页就会冻结并最终崩溃。此问题发生在所有用户和所有浏览器上。我一直定期更新，希望它能自行修复，但这似乎并非其他论坛的普遍问题，因此可能尚未被报告或修复。我们目前使用的是 `v2.3.0.beta9 +618`，我相信所有组件均为原生 Discourse。

使用 Chrome 的 JavaScript 控制台发现，错误发生在以下行，因此我推测循环未能正确终止：

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/text-post-process.js.es6#L90](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/text-post-process.js.es6#L90)

该代码于 4 月 23 日在以下提交中更新：[https://github.com/discourse/discourse/commit/a7bc1ecbaed754e3497f80ee24899e9a60b2bd75，因此可能是该更新导致了问题？](https://github.com/discourse/discourse/commit/a7bc1ecbaed754e3497f80ee24899e9a60b2bd75%EF%BC%8C%E5%9B%A0%E6%AD%A4%E5%8F%AF%E8%83%BD%E6%98%AF%E8%AF%A5%E6%9B%B4%E6%96%B0%E5%AF%BC%E8%87%B4%E4%BA%86%E9%97%AE%E9%A2%98%EF%BC%9F)

**复现步骤**

- 访问 [https://online-go.com](https://online-go.com) 创建一个免费账户（论坛使用 SSO，因此您需要一个账户）。
- 访问 `https://forums.online-go.com/` 并登录。
- 尝试回复或创建帖子，输入 `@t`，注意标签页会卡死并最终崩溃。

我很乐意提供任何其他详细信息或论坛访问权限，以帮助查明问题所在。

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2019年五月27日 22:03 UTC](https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821/2 "2019-05-27T22:03:00Z")

</div>

The bug seems to be in either a theme or a plugin that you’re using on the site. When I enter the site in safe-mode by going to [https://forums.online-go.com/safe-mode](https://forums.online-go.com/safe-mode) I’m able to add a username to a post without any problem. I didn’t try actually saving a post, but I’m fairly sure that will work in safe-mode. If I don’t enter safe-mode, I get exactly the error that you are describing.

---

<div class="post-metadata">

### Author: ![anoek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anoek/32/141917_2.png) [@anoek](https://meta.discourse.org/u/anoek)
#### Post date: [2019年五月27日 22:06 UTC](https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821/3 "2019-05-27T22:06:32Z")

</div>

Thanks for the incredibly fast reply!

Apparently it’s the theme, I’ll work from there. Thanks a ton!

---

<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: [2019年六月26日 22:06 UTC](https://meta.discourse.org/t/attempting-to-use-the-username-feature-crashes-the-tab/118821/4 "2019-06-26T22:06:42Z")

</div>

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