I successfully migrated Discourse to another server and the only issue is that the uploaded images in posts that were in the backup image are downloadable and viewable as a larger one.
Images that were uploaded in posts after the migration are smaller and not downloadable. download_remote_images_to_local is active.
What am I overlooking?
My guess is that the forum has to rebake all posts for the images to be correctly displayed.
You can have a look at sidekiq to see if there are related tasks running ; if not, try to rebuild a post HTML and see if it “repairs” the post images?
I tried that and even flushed the sidekiq queue, but it all stays the same.
I only encountered this symptom when migrating a forum, before the posts were baked. I have no idea then.
It’s okay, thank you for responding, though. I appreciate the effort.
@Bryanpwo, I’m no expert, but maybe I can take a quick look if you want to. I’d need temporary admin access to your forum for that.
Could this be the hotlink setting that was affecting you as well?
Nope. I see what I have done. I conflated two of your recent topics into brain-mush.
He stated that “download_remote_images_to_local is active.” so I guess this is not the issue. But maybe he ran out a bit of disk space during an automatic rebake of all posts or something like this?
It’s not the disk space, there’s plenty of it. (The VM it is running in still has around 300GB free) I am running baking uncooked posts to see if it solves the issue. I think it is done by tomorrow. It has to rebake 42512 posts.
But the issue is with new posts from after the migration.
I took a look at
@Bryanpwo’s forum and couldn’t see any obvious reason for which the Lightbox wouldn’t work.
The issue is acknowledged though:
We’ve seen this happen intermittently and we are looking at what could be the cause. We need a consistent reproduction of this scenario more than once with steps one can follow, so we can find a fix for it. So far we haven’t been able to do this.
For a quick fix, would you mind taking a
full backup of your instance, reinstalling your instance following the standard install and restoring the full backup? That always seems to resolve the issue.
We will keep looking at this though.
Several users were able to fix this issue, but it seems there is an array of possible causes.
I couldn’t do more than suggest a restore on a fresh,
standard install without any custom settings, plugins, themes, or theme components.
Agreed; you said migrated posts are fine so I wouldn’t worry about rebaking or the like. This seems to be an issue with the post-migration configuration.
Are you using an external asset host like S3 or some other object storage API?
Is the site public by any chance, so that we might look at how the posts are rendered?
Failing that, could you paste the
cooked fields (inside triple backtick quotes) for a new post that exhibits the issue?
First of all, thank you for trying to help out. You lost me there, how do I provide you with such info?
The3 site is public, the address is:
Great - that’s useful.
The issue is that the lightbox is not being applied for your new uploads.
Here is a post that shows the issue:
What games are you playing? - #948 by NX-01 - Gaming - EndeavourOS
Could you go into that post’s wrench icon then do
Rebuild HTML? That way we can rule out rebaking (or not).
Great to see you were able to look at it.
I just rebuild that post with HTML, it didn’t change a thing. I forgot to tell you, but I did try that option in other posts the past few days.
All images until May this year are Lightboxed, after that none of them are, including newly created posts. Before the migration (last week) every image was in Lightbox.
The easiest way is using the
data explorer plugin.
You can create a SQL query such as:
SELECT raw, cooked from posts
where raw like '%text from the post%'
And it returns these fields’ content:
It’s a great tool to explore data (
) and try to debug stuff sometimes.
Alright, that rules out issues that a rebake would fix, so the good news is that this is easily reproducible and likely a configuration problem.
Can you post the values of these site settings?
max image width
max image height
Have you overridden any other image related settings?
max image width: 690
max image height: 500
I didn’t touch the settings at all after migration, except for enabling the restore function.