Problems linking post to existing topic

Several times with the Wordpress plugin I’ve removed a link to one topic, saved the post, and then attempted to add a link to different existing topic, only to get this error:

There has been an error linking this post with Discourse. Make sure you are supplying the URL of an existing topic on your forum.

Any ideas how I can fix this? Or is it a bug others can reproduce?

Thanks.

From the error message you have given, it sounds like you are using the WordPress Classic editor. Is this correct? If so, I’ll test it out.

4 Likes

Yes. The classic editor. Thx.

You will get the error you are reporting if the domain of the topic you are attempting to link to doesn’t match the domain of the Discourse URL you have entered on the plugin’s Connection Settings tab. Does this sound correct for your case?

3 Likes

No. It’s the same domain that it auto-posts to. Just a different topic. Just checked the domain and it is correct. I doubt auto-posting would work if that setting was wrong.

Any other ideas?

I have seen problems with linking topics in the past when multiple domains are pointing at the Discourse site. Is your forum self-hosted?

No. We are on Communiteq (formerly DiscourseHosting).

Oddly I know this used to work. I don’t know when it stopped working, but the change must have been upgrading either Discourse itself or the Wordpress plugin. I’m pretty sure nothing else in settings changed.

I don’t think anything has changed in the plugin’s code for linking topics recently. Have there been any recent changes to your WordPress site? For example, have you moved it to new hosting, or changed the version of PHP that it’s using?

The domain name is parsed from the URL with wp_parse_url. It is possible that it’s not parsing the domain correctly.

3 Likes

Ah. I remember now that we asked for the house ads plugin on Discourse which caused them to move us to a new server.

Perhaps I should simply re-setup the WP plugin and see if that fixes it?

3 Likes

There should be no other differences than that plugin though. So I doubt this has anything to do with this issue.

1 Like

Completely deleting the Discourse plugin in Wordpress and reinstalling it and setting it up with exactly the same settings fixed the issue.

3 Likes

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