WP Discourse comments only being linked to

Greets,

I’ve set up WP Discourse on my site to take over comments on posts. I’ve got it set to show all comments but it keeps defaulting to only showing a link to the comments on Discourse. I’ve switched to several different standard themes to see if it was a theme issue but the problem persists.

Any idea how I can fix/tweak this?

Thanks,
Ray

Admin:

Comment area on post page:

1 Like

Thanks for reporting that! Can you let me know what version of Discourse your forum is on, and also what version of the WP Discourse plugin you are using?

1 Like

Sure, I’m on Discourse 2.6.0.beta1 and the plug-in is 2.1.0.

Let me know how i can help. : )

Thanks!
Ray

1 Like

Can you try updating to WP Discourse 2.1.1 and let me know if that solves the problem?

I know where in the code the problem is happening, but haven’t been able to reproduce it yet. We’ll get this sorted out, but it might not happen before Monday.

3 Likes

Just updated and the issue seems to persist.

No rush at all though. Just holler if you need me to try anything.

Have a good weekend!

Ray

2 Likes

So far the only way I can find to reproduce the issue is by publishing a post to Discourse and then converting the topic to a PM on Discourse. Discourse PMs will have the following icon:

Is it possible that the post you are trying to link to was converted to a PM on Discourse? If this is the case, then having the comment link displayed is the expected behaviour. If the topic has not been converted to a PM, I’ll keep trying to find a way of reproducing the issue.

Have you tried publishing more than one post to Discourse? If so, is the issue happening for all posts?

1 Like

Simon,

They were not converted to PMs. I’ve published several test posts with subsequent comments and they all just link back to the discussion rather than display the comments. It’s a weird thang, for sure.

I’d be happy to give you access to my set-up if you need, it’s not live anyway.

Do let me know what else I can do.

Thanks,
Ray

P.S. I also noticed that regular Wordpress comments (ones posted prior to hooking into Discourse) are not loaded at all even though I have Discourse set to allow them to be displayed. It just shows “Comments are not currently available for this post.”

2 Likes

I keep trying to reproduce the issue, but I’m not having any luck. Could you try enabling “Custom fields” from the Options section of the WordPress edit screen:

After having done that, you should see an expandable Custom Fields section at the bottom of the editor. Can you let me know if you see a discourse_comments_raw entry in that section and what if any value you are seeing? It should look something like this, but I suspect it will be empty for your posts:

For posts that you’ve published to Discourse and have commented on, are you seeing the updated comment count on the Discourse link that’s displayed on WordPress? Depending on whether or not you’ve configured the WP Discourse “Sync Comment Data” option, it will take up to 10 minutes to see the comment count, but a post with a single comment should be displaying a link that looks something like this:

I realize that what you’re wanting to do is display comments, not a link to the comments, but if the comment number is getting updated it will let us know that the plugin is able to retrieve some data about the topic from Discourse.

One last thing to check is to make sure that the API Key you have added to the WP Discourse API Key setting is an All Users API Key. When you create the key, it should look be configured like this:

After saving the key, copy it to the WP Discourse API Key setting. Make sure that the Publishing Username setting is set to system.

2 Likes

Okay, I enabled custom fields and you expected right – there is no custom field entry for discourse_comments_raw (although other Discourse entries are there). No name or value.

The comment count link at the bottom of the post is updating so at least that works (BTW when you click on the comments link at the top of the post, it doesn’t jump to the bottom of the page where the comments should be).

I can confirm the API key is set to all users and is global. I set a brand new one just in case and the behavior repeats.

Let me know how I can help further debug this.

Really appreciate your comprehensive sorting of this. : )

PS. I turned off all plugins except for Discourse just in case but nada.

2 Likes

Can you try updating to WP Discourse version 2.1.2 ? That version should fix the issue that was causing the comment link to be displayed.

3 Likes

That did the trick!

Thanks for your efforts to kick this one in the bud, Simon : )

Ray

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.