My Discourse emojis don't work when I change my Discourse domain

At the first

I feel very sorry for not using the search function to check if my question has been answered before. English is not my main language, so I might have some trouble searching accurately in this English forum. I tried to write this post in English myself, and I rarely used translation software, so there might be some grammar errors. I apologize for that.

My question

Just like the title of this post, I changed my Discourse domain. I love emojis, and there are a lot of emoji pictures in my forum. After I changed my domain, the emojis stopped working! I checked the URLs of these emojis, and they are all pointing to the old domain.

At the end

I feel very frustrated because I can’t use the emojis now. I tried to find the URLs of these emojis and update them, but I’m not sure how to do it. Can anyone help me with this? Thank you so much!

If you don’t know my mean, I can give you an example.

—Before I change my Discourse domain—

Old Domain: forum(dot)example(dot)com
Emoji picture URL: forum(dot)example(dot)com/happy.png

—After I change my Discourse domain—

New Domain: bbs(dot)example(dot)com
Emoji picture URL: forum(dot)example(dot)com/happy.png

Are you referring to old posts with Emojis?

If so use the wrench on a post and select

  • Rebuild Html

There is a command line Rails Option to rename posts to fix it on all posts made prior to the move

Any uploaded pictures will also be broken. When I ran into this I was not aware of the rails command line fix and rebuilt majority of posts as I came across them. :joy:

4 Likes

Thank you a lot! I will try it. Thank you for your reply😆

1 Like

Your method is very good, and I solved my problem. Thank you very much!

1 Like

You’re quite welcome. Though as mentioned there is a command you can run on your server to reprocess posts. I just don’t recall it off hand.

Otherwise manual works just can be quite tedious. :wink:.

Glad to be if assistance

2 Likes

That would be rake posts:rebake.
And rebaking with a pattern, there is this guide: Rebake all posts matching a pattern.

3 Likes

Thank you for your suggestion! It is very easy and fast❤

3 Likes