Moin
2026 年1 月 16 日 15:51
1
最近,我尝试将帖子移动到新主题时遇到了困难。模态框只显示:
移动帖子时发生错误。
好吧,这次没那么难;我没有选择分类。但是,有趣的事实是,即使我添加了分类,它也不起作用。所以我检查了浏览器控制台:
那也没有帮到我,但最后,我在网络选项卡中发现了:
如果没有可以访问这些工具的设备,知道这一点会非常有帮助。是否可以在界面中显示实际的错误消息?
相关的离题问题
这本来可以帮助我理解为什么我有时能够以标题“Testing”拆分成一个新主题,而有时却不能。
然后我就知道是字符数的问题,并且会更接近于认为,如果第一个选定的帖子是由管理员创建的,情况可能有所不同。管理员在拆分帖子时,如果帖子是由管理员撰写的,是否可以绕过 min topic title length(最小主题标题长度),但如果帖子是由用户创建的则不行?
5 个赞
我觉得这不算是一个 Contribute > Feature (功能贡献),而是一个 Contribute > Bug (Bug 修复)
main ← fix/move-posts-show-server-error
merged 06:30PM - 09 Feb 26 UTC
When moving posts to a new topic fails (e.g. title too short, missing required t… ags, duplicate title), the modal only shows a generic "There was an error moving posts." message. Users had to open browser dev tools and inspect the network response to find the actual reason for the failure.
Use `extractError` from `ajax-error.js` to extract the specific error message from the server's JSON response, falling back to the generic message when no details are available.
https://meta.discourse.org/t/393690
**BEFORE**
<img width="1727" height="1461" alt="2026-02-09 @ 10 23 04" src="https://github.com/user-attachments/assets/2e5f8880-44c3-4734-92b8-f663ced64f25" />
**AFTER**
<img width="1727" height="1461" alt="2026-02-09 @ 10 22 21" src="https://github.com/user-attachments/assets/8de939ef-8033-4672-ab21-1de04d1e4ec7" />