Change domain and rebake post all image not show

All image broken after change domain and rebake post

Now post don’t have this issue, only old post.

We are using S3.

Did you follow Change the domain name or rename your Discourse?

Did you change anything about the S3 configuration? Did it change domain names too? That’s a whole other problem.

We changed the S3 bucket name too.

But I moved all files to new bucket.

As example:

This is the old backup from database, we unziped.

Once we rack the topic, looks like the old short URL not able to find full url.

Then you need to remap the database so that the uploads have the new URL in them.

Do new uploads work?

Yes, all new uploads works.

Only for old existing attachment.

I also take looked at the database dump SQL.

for table uploads still using value:

//com-ossez-www-discourse.s3.dualstack.us-east-2.amazonaws.com/discourse-uploads/original/2X/e/e7ace3e99f6d7dd9520bebfe4f2de91898a05849.png

Because, I changed bucket name.

This value should named as:

//com-isharkfly-www-discourse.s3.dualstack.us-east-2.amazonaws.com/discourse-uploads/original/2X/e/e7ace3e99f6d7dd9520bebfe4f2de91898a05849.png

I think I found the reason and get all fixed in our website.

All Chinese version steps, please ref our fixing log: 不是很严重,但是也有点严重的问题 —— 附件无法显示 - Discourse - iSharkFly

The main reason was the table of uploads.

We don’t know why the rows for this table get wrong, about 60% of data in this table got lost, we have to use our local back up convert data to SQL and run at production to get all lost data insert.

after that, rebake post will fix all issue.

This is not an issue for source code and base62 encode/decode did their job.

Thanks. team.

CC: @pfaffman

1 Like

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