Image links point to Incorrect (Previous) subdomain After Migration

I migrated my discourse install from one host to another yesterday and I’ve come across a peculiar issue.
During the migration, I created a forums2 subomain, assigned what would be the new IP for the forums to it then moved the DB and files over.

Once that was done and working, I updated forums2 subdomain name to “forums”

It’s been behaving pretty well, but I noticed a strange issue with the images in this topic:

https://forums.kartpulse.com/t/for-fun-alternate-uses-for-kart-motors/830

The images are not visible and the the HTML points to forums2 as being the image source. Yet if I edit the post, the images are visible and only refer to the relative url path.

An ideas how I might have caused this, or how I can resolve it. I rebaked the posts, that didn’t seem to help.
I noticed the domain was incorrect in my app.yml, fixed, rebuilt, but the problem persists.

This maybe helpful for You but wait for an advice from @pfaffman first

1 Like

Thanks Bhanu. I don’t think they got tombstoned (Classic term for it). I think it was more of a misstep on my behalf with the subdomains and app.yml

Did You try Rebaking Posts then?

Ps: I mentioned to wait for some experienced advice.

Yeah I rebaked and It didn’t seem to help. I understand, an appreciate your help :fist:

1 Like

Update, rebuilding the app after correcting app.yml did not fix the image links. The still point to forums2 subdomain.

I’m guessing this has something to do with the initial import being done when it was still under that subdomain? Any ideas on how I can fix this?

Here’s an example again. You can see the source for the images points to forums2.kartpulse.com
For now I have the forums2 subdomain pointed to the same IP as forums to the images will at least appear.

See the last part of this guide: Change the domain name or rename my Discourse?

5 Likes

Thanks Rafael, “remap and rebake” portion is what I was missing.
I caught one emoji image (Non custom emoji) in a banner topic that the domain stayed with the old one. Not sure why or how, but it’s really not an issue, more of an FYI.

This topic was automatically closed after 2338 days. New replies are no longer allowed.