WP Discourse 显示错误的论坛链接

I’m not exactly sure when this started happening. We’ve been using discourse and WP discourse for a few years and never had any issues before.

The comment links below a post sometimes show the wrong URL. For example, here’s a post:

Linked to the correct forum topic:

discourse-post-linked

But showing the wrong URLs under the post:

This is the wrong topic it links to:

I have no clue why it’s doing this, so I checked some of the WP discourse webhook settings:

/wp-admin/admin.php?page=wp_discourse_options&tab=webhook_options

Never used these before, so I enabled some:

  • Sync Comment Data
  • Match Old Topics

Created the webhook, secret key, and verified that the delivery status is “Successful”.

Doesn’t make any difference though. How can I debug this or figure out why it’s showing the wrong URLs? Anything I am missing?

Thanks for your help!

Rene

2 个赞

If I were you, the first thing I would try to fix it is uninstall and reinstall the WP-Discourse plugin and then recreate your settings. I’ve had that fix strange problems for me in the past.

1 个赞

看起来您已经自定义了评论模板。您的网站上最近是否对此进行了任何更改?

您是否启用了“缓存评论 HTML

3 个赞

我尝试过禁用并重新启用它,但没有任何效果。如果其他方法都无效,我会重置它的设置并重新开始,但我更希望能避免这样做::sweat_smile:

我们确实通过一些自定义函数进行了定制,但我已经禁用了该功能。我本应提到这一点,另外我们之前也更换过主题。

这会不会触发了某些问题?是否有可能重置已链接的主题,使其能够自动重新链接主题?

这个问题只出现在部分帖子中,如果我能手动修复它们,那也可以。

[quote=“simon, post:3, topic:136901”]
你是否启用了“缓存评论 HTML

1 个赞

这是一个奇怪的问题,因为在您的编辑页面上,Discourse metabox 中显示的是正确的 Discourse 主题。这意味着 discourse_permalink 帖子元数据的值已正确设置。

您能否尝试取消帖子与 Discourse 的关联,然后重新将其链接到对应的 Discourse 主题?这将删除并重置与该帖子相关的所有 Discourse 元数据。我不认为这会解决问题,但最好先排除这种可能性。

如果这不能解决问题,能否请您发布或私信我一些关于您网站上模板自定义的详细信息?

嗨,Simon,

刚刚测试了这个问题。取消关联主题,保存帖子,再次关联,保存帖子。结果一样。

我会给你发私信 :slight_smile:

Rene

1 个赞