I run a Discourse site and I wish to start by saying how much I love this software. Thanks to all the team for the great work, this is an awesome tool.
After a 2.5.0 upgrade, I went into big troubles. Here is the recap and the workaround I did. Maybe this will lead to a much better fix in future versions.
Some of the topics we have in our database contain broken uploads. We used the “S3 uploads” feature and deleted the bucket by mistake. Yes, that’s a very stupid thing to do, but, well, we did! The result was that all the topics images were lost.
Except from the fact we had lost many images, everything was fine, Discourse was showing broken links to non existing pictures, but all was good.
But when we wanted to upgrade to 2.5.0, it went crazy: all logged-in users got 500 errors, while anonymous visitors were able to see the website.
After investigating, I realized Discourse was dying on “No such file” errors. It was trying to download them it seems. I had to force the
local? method to true in
/var/www/discourse/app/models/upload.rb and that did the trick, but I’m a bit worried about the next upgrades…
This is clearly something new, as previous upgrades did not break.
By the way, is there any method I can follow to remove all the dead image links we have in our topics?