A user reports that the “Start the Discussion” link at the bottom of their WordPress blog posts is no longer working, linking to “topic_url” instead of the correct Discourse topic. The issue began after a WordPress theme update, though the user is unsure when it started. The user confirms the link works in the WordPress post edit view but not on the frontend. The problem occurs across all posts and is linked to the WP Discourse plugin’s Ajax loading feature. Disabling Ajax resolves the issue, but the link then includes unwanted query parameters. The user also notes the link works only when logged into WordPress, suggesting a potential issue with post custom fields not loading in certain conditions. The user seeks guidance on disconnecting WordPress from Discourse, and the moderator confirms that uninstalling the plugin and removing the API key and webhook in Discourse is sufficient. Piecesangus
I am not sure what you mean with subsequent publication.
I published a new blog post yesterday. Publishing this post seems to have worked normal and got posted to my Discourse forum as expected. I checked this morning to find out the link below it doesn’t work anymore (I found out by chance). I didn’t do anything special, like updating or any other actions.
I am sure it worked before, I am not sure how long it is not working anymore.
I see. This suggests to me that there is some other issue with your wordpress instance as the data that sets that URL in the post edit view is the same data that fills the topic_url in the comment template. In other words, the data is there, but it’s not being loaded in the comment template for some reason.
Are you seeing any issues in your PHP logs? If you’re not sure where those are, are you able to ask your hosting provider?
Are you seeing this issue on any other post?
Are you seeing any errors in your browser console?
Could you try disabling ajax loading of comments in the “WP Discourse > Comments” settings and see if that changes anything.
I need to have a look tonight, I don’t have access to the PHP logs right at this moment
I am seeing this issue across all posts
I only see a cookie (blocked) related issue in the browser console (I don’t think this is related but happy to take your guidance if it is)
I turned off Ajax and this seems to fix the link, however the link has a lot of additional characters behind the link that is defined in my blogpost on Wordpress (e.g. www.mydomain/post/1 became www.mydomain/post/1?_ahsdkhsdkhkh*lnnjasdfa)
Ok, the issue might be connected to scripting and/or ajax on your Wordpress then. Why did you enable ajax loading? Do you have any concerns about leaving it turned off?
I think it was enabled when I installed the plugin, if not I didn’t enable it for a specific reason. I just find it weird that it stopped working without a clear reason (other than a Wordpress or Theme update).
Hey @Pieces, that will be something to do with your site, not this plugin. It sounds like something is preventing post custom fields from being loaded in your Wordpress in certain circumstances.
You’ll need to debug that on the Wordpress side of things. If you have a hosting provider or developer, I’d run this issue by them. If you made any changes to the site recently, I’d try reversing the change and see if it fixes the issue.
What would be the best process to disconnect my Wordpress from Discourse? Is it simply uninstalling (deleting) the plugin in Wordpress (in the plugin section in Wordpress) and removing the API key and Webhook in Discourse?