几天前,可能是在更新了其中一个插件之后,WordPress 中的文章停止在社区评论中显示。
我们更新了哪些插件?“Advanced Ads, GTM4WP, Rank Math SEO, Rank Math SEO PRO, Super Progressive Web Apps, Webpushr Push Notifications”
我可以尝试一次禁用一个插件,但由于我需要这些插件,找到罪魁祸首可能也无济于事。
我发现了什么?
- 在 WordPress 上发布文章(上午 10 点)后
- 会发生两次连接到 https://www.svetandroida.cz/wp-json/wp-discourse/v1/update-topic-content(2025-05-28 10:00:12 和 2025-05-28 10:00:13)
2025-05-28 10:00:12
请求
标头
Request URL: https://www.svetandroida.cz/wp-json/wp-discourse/v1/update-topic-content
Request method: POST
Accept: */*
Connection: close
Content-Length: 1341
Content-Type: application/json
Host: www.svetandroida.cz
User-Agent: Discourse/3.5.0.beta5-dev-2f3404fe4dc8de701790c7d9aba439e12acaa0cc; +https://www.discourse.org/
X-Discourse-Instance: https://komunita.svetandroida.cz
X-Discourse-Event-Id: 93045
X-Discourse-Event-Type: topic
X-Discourse-Event: topic_created
X-Discourse-Event-Signature: sha256=8f82111ab871e302efb54fa8cf5029c01aa8f706ae6e441ea5e9757f17c6a1c9
有效负载
{
"topic": {
"tags": [],
"tags_descriptions": {},
"id": 42061,
"title": "Chytrý zámek TP-Link Tapo DL100 stojí málo a potěší funkcemi. Dá se i ovládat hlasem",
"fancy_title": "Chytrý zámek TP-Link Tapo DL100 stojí málo a potěší funkcemi. Dá se i ovládat hlasem",
"posts_count": 1,
"created_at": "2025-05-28T08:00:12.007Z",
"views": 0,
"reply_count": 0,
"like_count": 0,
"last_posted_at": "2025-05-28T08:00:12.076Z",
"visible": false,
"closed": false,
"archived": false,
"archetype": "regular",
"slug": "chytry-zamek-tp-link-tapo-dl100-stoji-malo-a-potesi-funkcemi-da-se-i-ovladat-hlasem",
"category_id": 5,
"word_count": 77,
"deleted_at": null,
"user_id": 1276,
"featured_link": "https://www.svetandroida.cz/tp-link-tapo-dl100-chytry-zamek-predstaveni/",
"featured_link_root_domain": "svetandroida.cz",
"pinned_globally": false,
"pinned_at": null,
"pinned_until": null,
"unpinned": null,
"pinned": false,
"highest_post_number": 1,
"deleted_by": null,
"has_deleted": false,
"expandable_first_post": true,
"bookmarked": false,
"participant_count": 1,
"thumbnails": null,
"created_by": {
"id": 1276,
"username": "kurfy",
"name": "kurfy",
"avatar_template": "/user_avatar/komunita.svetandroida.cz/kurfy/{size}/1454_2.png"
},
"last_poster": {
"id": 1276,
"username": "kurfy",
"name": "kurfy",
"avatar_template": "/user_avatar/komunita.svetandroida.cz/kurfy/{size}/1454_2.png"
},
"related_topics": [],
"summarizable": false
}
}
回答
标头
user-agent: Discourse/3.5.0.beta5-dev-2f3404fe4dc8de701790c7d9aba439e12acaa0cc; +https://www.discourse.org/
server: nginx
date: Wed, 28 May 2025 08:00:13 GMT
content-type: application/json; charset=UTF-8
transfer-encoding: chunked
connection: close
vary: Accept-Encoding
x-robots-tag: noindex
link: <https://www.svetandroida.cz/wp-json/>; rel="https://api.w.org/"
x-content-type-options: nosniff, nosniff
access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
allow: POST
server-timing: wp-before-template;dur=51.55
alt-svc: h3=":443"; ma=86400
x-nginx-cache-key: POST|www.svetandroida.cz|/wp-json/wp-discourse/v1/update-topic-content
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000
content-encoding: gzip
主体
"{\"success\":false,\"message\":\"The webhook event is not supported.\"}"
2025-05-28 10:00:13
请求
标头
Request URL: https://www.svetandroida.cz/wp-json/wp-discourse/v1/update-topic-content
Request method: POST
Accept: */*
Connection: close
Content-Length: 2547
Content-Type: application/json
Host: www.svetandroida.cz
User-Agent: Discourse/3.5.0.beta5-dev-2f3404fe4dc8de701790c7d9aba439e12acaa0cc; +https://www.discourse.org/
X-Discourse-Instance: https://komunita.svetandroida.cz
X-Discourse-Event-Id: 93047
X-Discourse-Event-Type: post
X-Discourse-Event: post_created
X-Discourse-Event-Signature: sha256=771aff243d85827cce5cdc1f26347fdb623133e5ff8f4ff4285ea85d7278713a
有效负载
{
"post": {
"id": 55393,
"name": "kurfy",
"username": "kurfy",
"avatar_template": "/user_avatar/komunita.svetandroida.cz/kurfy/{size}/1454_2.png",
"created_at": "2025-05-28T08:00:12.076Z",
"cooked": "<p><small>Originál článek publikovaný na:\t\t\t<a href=\"https://www.svetandroida.cz/tp-link-tapo-dl100-chytry-zamek-predstaveni/\" class=\"inline-onebox-loading\" rel=\"noopener nofollow ugc\">https://www.svetandroida.cz/tp-link-tapo-dl100-chytry-zamek-predstaveni/</a><br>\n</small></p><br>\nReklama Chytrý zámek TP-Link Tapo DL100 stojí jen 1 500 Kč v přepočtu Pyšní se funkcí maskování PINu, která umožňuje bezpečnější zadávání kódu Podporuje integraci se smart home systémy a ovládání pomocí hlasových asistentů Společnost TP-Link představila cenově dostupný zámek Tapo DL100, který lze integrovat do chytré domácnosti. S cenou 69,99 dolaru (asi 1 500…",
"post_number": 1,
"post_type": 1,
"posts_count": 1,
"updated_at": "2025-05-28T08:00:12.076Z",
"reply_count": 0,
"reply_to_post_number": null,
"quote_count": 0,
"incoming_link_count": 0,
"reads": 0,
"score": 0,
"topic_id": 42061,
"topic_slug": "chytry-zamek-tp-link-tapo-dl100-stoji-malo-a-potesi-funkcemi-da-se-i-ovladat-hlasem",
"topic_title": "Chytrý zámek TP-Link Tapo DL100 stojí málo a potěší funkcemi. Dá se i ovládat hlasem",
"category_id": 5,
"display_username": "kurfy",
"primary_group_name": null,
"flair_name": null,
"flair_group_id": null,
"version": 1,
"user_title": null,
"bookmarked": false,
"raw": "<small>Originál článek publikovaný na:\t\t\thttps://www.svetandroida.cz/tp-link-tapo-dl100-chytry-zamek-predstaveni/\n\t\t</small><br>Reklama Chytrý zámek TP-Link Tapo DL100 stojí jen 1 500 Kč v přepočtu Pyšní se funkcí maskování PINu, která umožňuje bezpečnější zadávání kódu Podporuje integraci se smart home systémy a ovládání pomocí hlasových asistentů Společnost TP-Link představila cenově dostupný zámek Tapo DL100, který lze integrovat do chytré domácnosti. S cenou 69,99 dolaru (asi 1 500…",
"moderator": false,
"admin": false,
"staff": false,
"user_id": 1276,
"hidden": false,
"trust_level": 2,
"deleted_at": null,
"user_deleted": false,
"edit_reason": null,
"wiki": false,
"reviewable_id": null,
"reviewable_score_count": 0,
"reviewable_score_pending_count": 0,
"post_url": "/t/chytry-zamek-tp-link-tapo-dl100-stoji-malo-a-potesi-funkcemi-da-se-i-ovladat-hlasem/42061/1",
"has_post_localizations": false,
"post_localizations": [],
"topic_posts_count": 1,
"topic_filtered_posts_count": 1,
"topic_archetype": "regular",
"category_slug": "komentare-svet-androida"
}
}
回答
标头
user-agent: Discourse/3.5.0.beta5-dev-2f3404fe4dc8de701790c7d9aba439e12acaa0cc; +https://www.discourse.org/
server: nginx
date: Wed, 28 May 2025 08:00:13 GMT
content-type: application/json; charset=UTF-8
transfer-encoding: chunked
connection: close
vary: Accept-Encoding
x-robots-tag: noindex
link: <https://www.svetandroida.cz/wp-json/>; rel="https://api.w.org/"
x-content-type-options: nosniff, nosniff
access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
allow: POST
server-timing: wp-before-template;dur=71.76
alt-svc: h3=":443"; ma=86400
x-nginx-cache-key: POST|www.svetandroida.cz|/wp-json/wp-discourse/v1/update-topic-content
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000
content-encoding: gzip
主体
"{\"success\":true,\"message\":\"The posts have been updated.\"}"
在 WordPress 中,文章的元数据如下所示。请参见截图:
这已经不是我们第一次遇到“WP-Discourse”插件的类似问题了,所以我想问一下是否有办法修改该插件以防止这种情况发生。
