# 記事の下のコメントが自動的にリンクされないDiscourse

**URL:** https://meta.discourse.org/t/discourse-not-linking-the-comments-automatically-under-the-articles/299364
**Category:** WordPress
**Created:** [2024 年 3 月 14 日午後 4:39 UTC](https://meta.discourse.org/t/discourse-not-linking-the-comments-automatically-under-the-articles/299364 "2024-03-14T16:39:54Z")
**Posts on this page:** 1
**Showing post:** 21

<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: [2024 年 4 月 20 日午後 8:12 UTC](https://meta.discourse.org/t/discourse-not-linking-the-comments-automatically-under-the-articles/299364/21 "2024-04-20T20:12:45Z")

</div>

> [@Miasanrot](#):
>
> そして、どのツールですか？

WP Rocket で問題ないはずです。Discourse のコメントを表示している WordPress ページでキャッシュをクリアする必要があるかもしれません。こちらに良い提案があります: [WP Discourse comment webhook does not trigger a WP Rocket Cache refresh - #13 by Brandon007](https://meta.discourse.org/t/wp-discourse-comment-webhook-does-not-trigger-a-wp-rocket-cache-refresh/236700/13?u=simon%E3%80%82WP) Discourse の「ajax load」オプションも妥当な回避策です。

こちらが本当の問題のようです:  
`[2024-03-14 06:02:59] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"","wp_post_id":13514,"http_code":403} `

これは、[WP Discourse](https://github.com/discourse/wp-discourse) プラグインがコメントを取得しようとしたときに、Discourse が `403` (禁止) の応答を返していることを示しています。(エラーはこちらからログに記録されています: [wp-discourse/lib/discourse-comment.php at main · discourse/wp-discourse · GitHub](https://github.com/discourse/wp-discourse/blob/main/lib/discourse-comment.php#L230))

推測ですが、このプラグインは WordPress サイトがプロキシの後ろにあることを示唆しています:

> [@Miasanrot](#):
>
> `Proxy Real IP - 1.1`

それが Discourse で `403` エラーを引き起こしている可能性があります。リクエストヘッダーが正しく設定されていないのでしょうか？私にはよくわかりません。しかし、Discourse サイトのエラーログページを開いた状態で、WordPress から投稿を公開することで問題を確認できるかもしれません。

エラーログページにアクセスするには、このリンクをクリックしてください:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/2/b/d2b291b6dc87107e4adaa7cf8023e9aef85a0dd7.png)

`403` の応答があれば、ログにエントリがトリガーされると思います。もしそうなら、(編集された) エラーメッセージをここに共有してください。

---

_[View the full topic](https://meta.discourse.org/t/discourse-not-linking-the-comments-automatically-under-the-articles/299364)._
