Image links point to Incorrect (Previous) subdomain After Migration


(James Mc Mahon) #1

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.


(Bhanu Sharma) #2

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


(James Mc Mahon) #3

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


(Bhanu Sharma) #4

Did You try Rebaking Posts then?

Ps: I mentioned to wait for some experienced advice.


(James Mc Mahon) #5

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


(James Mc Mahon) #7

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.


(Rafael dos Santos Silva) #8

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


(James Mc Mahon) #9

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.