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

问题

自大约两周前更新以来,每当用户尝试通过输入 @用户名 来提及某位用户时,标签页就会冻结并最终崩溃。此问题发生在所有用户和所有浏览器上。我一直定期更新,希望它能自行修复,但这似乎并非其他论坛的普遍问题,因此可能尚未被报告或修复。我们目前使用的是 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

该代码于 4 月 23 日在以下提交中更新:https://github.com/discourse/discourse/commit/a7bc1ecbaed754e3497f80ee24899e9a60b2bd75,因此可能是该更新导致了问题?

复现步骤

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

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

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 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.

4 个赞

Thanks for the incredibly fast reply!

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

3 个赞

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