我刚意识到,在不带帖子编号的情况下点击链接后,我无法返回到原始主题。举例说明:
https://meta.discourse.org/t/welcome-to-meta-discourse-org/1
https://meta.discourse.org/t/welcome-to-meta-discourse-org/
这是一个 bug,还是设计上就不支持?
我刚意识到,在不带帖子编号的情况下点击链接后,我无法返回到原始主题。举例说明:
https://meta.discourse.org/t/welcome-to-meta-discourse-org/1
https://meta.discourse.org/t/welcome-to-meta-discourse-org/
这是一个 bug,还是设计上就不支持?
我想说这是一个边缘情况,之前也曾有人报告过。
我们的 Ember 路由器和 Discourse 服务器路由器在此处的处理上存在细微分歧。
无论如何,依赖不断变化的 slug 来进行话题路由是非常脆弱的。如果我们把“欢迎来到 meta discourse org”重命名为“欢迎来到 meta discourse”,这一切都会彻底崩溃。
经验教训是:如果你需要稳定的链接,就不要移除话题 ID。在这种情况下,话题 ID 是 1,它不是帖子 ID 或编号。
好的,谢谢!所以如果我想让内部来回工作,我实际上需要同时保留 slug 和 id 吗?因为只使用 id 似乎不起作用:https://meta.discourse.org/t/1
好的,请保留 slug 和 id:
例如 https://meta.discourse.org/t/cant-navigate-back-when-using-urls-without-post-number/197060
这样链接将保持稳定。另外,这种方式虽然可行,但在我看来不够美观,并且会导致重定向。
好的,所以我只需要任何 slug 和正确的 id,就像 t/welcome/1 一样。
感谢您的澄清 ![]()
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.