Wrong path after update of permalinks - bug?

It seems like when I update the parmalink structure in Wordpress and then update the discourse post both paths to the article is not updated.

The path in the article is:

Skærmbillede 2020-05-05 kl. 16.44.53

But not the link in the topic text.

Skærmbillede 2020-05-05 kl. 16.45.34

Is that a bug or meant to be this way?

Now I have a deadlink in the topic…

Edit: added link to the post if my text didnt maked sense…

1 Like

I would expect the “Originally published at” link in the post to be updated if you click the “Update Topic” button on Discourse. The featured link that is in the topic’s header will not be updated though. This is a problem. I’m looking into what can be done to fix it.

2 Likes

It is working good.

Thanks :+1:

Any news regarding this topic?

should it be moved to bugs?

It is a solvable problem, but will require some fairly significant changes to the plugin to get it to work. I’ll try to get it done next week. In the meantime, you can prevent the broken featured links from displaying by disabling the Discourse topic featured link enabled site setting.

2 Likes

Howdy,

I have a Wordpress install that is successfully connected to Discourse using the excellent WP-Discourse plugin. I have just transferred my Wordpress site from its old domain name of webcomics.yaoi911.com to its new domain name of youngprotectors.com. Nothing else has changed, just the domain name, the rest of the URL structure is the same.

But all my Wordpress to Discourse posts are still showing the old URL:

I’d like to change all references to my old domain name to the new domain name in my Discourse install.

I did a search here and found a thread from 2017 which indicated that the best way to do that was through the Rails Console. I’ve never done any edits that way before, but I’m up to learn something new. :slight_smile:

I just wanted to make sure that this is still the preferred method of solving this. I think all I need to do is copy and paste this code into the command line after logging into my rails console:

Am I understanding what to do correctly, @simon? Is that the best way? Will it also change the links in the content of the posts?

Please let me know if you get a chance. Thanks!

Alex

2 Likes

I just pushed WP Discourse version 2.0.5 to the WordPress plugin repo. WIth that update, if the “Add Featured Links” setting is enabled on WordPress, the Discourse featured link will be updated when the “Update Topic” button is clicked on WordPress. The feature link will also be updated if you select the 'Update Discourse Topic" checkbox when publishing posts with the Classic editor.

This should take care the issue that was happening when either a WordPress site’s domain name or permalink structure is changed. It does require you to update each post manually though, so for a site with a lot of posts there could be a fair amount of work involved.

2 Likes

Thank you, Simon. It is a bit labor-intensive, especially because I’ll also need to re-add my comic images to the top of every post, but the new update worked exactly as planned and I really appreciate the quick turnaround.

You rock!

Alex

2 Likes

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