WP Discourse plugin - comments are not displaying under posts

Hi,
I installed WP Discourse plugin on our Wordpress site, connected to our Discourse forum. When I publish a post in Wordpress, it shows up on our Discourse forum (so the connection is working). However, the comments are not being pulled from Discourse (I added a few comments for the posts via Discourse, these comments are not displayed in Wordpress).
I’ve searched your forum on this issue, and checked / followed all the suggestions, such as to make sure there is an admin user with the same username in Wordpress as in Discourse, and that username is used as a Publishing Username). “User Discourse Comments” is enabled in the plugin settings. I did not touch SSO. I tried configuring webhooks, and that did not fix the issue.

A thought that crossed by mind - does the SSL certificate need to be enabled on Wordpress for this to work? Currently there is no certificate on the Wordpress site, as the site is still in development, but we plan on adding one soon.

If you can offer me any guidance on this issue, I would greatly appreciate it.

thank you!

Also, I noticed that the URL for the webhook (my Wordpress domain + “/wp-json/wp-discourse/v1/update-topic-content” gives me a 404 (not found) error. Could this be part of a problem?

I figured it out - in Wordpress -> Settings -> Permalinks needs to be set to Post Name. (Mine was the default “Plain” setting). I would imagine most working Wordpress sites would not be set with the “Plain” settings, but this was a brand new site under development without much configured on it).

3 Likes

Thanks for bring this up. The webhook is using the WordPress REST API. It can work with plain permalinks, but the webhook URL needs to be structured differently. The plugin should check if plain permalinks are being used and give the correct webhook URL for those cases.

1 Like

No problem, it did not take me long to figure this out. But you might mention this in the “how-to” doc for the plugin, so that others don’t stumble on this hurdle.

2 Likes

This has been fixed in the latest release (1.5.9). If the plain permalink structure is being used, the webhook URL in the setting’s description is set to http://yoursite.com/index.php?rest_route=/wp-discourse/v1/update-topic-content.

2 Likes