Category logo deleted after some edit


I noticed a little bug on Discourse, and I managed to find the steps to reproduce it :

  • Edit a category that has a logo and change the parent category
  • After 24/48 hours, the logo image will give an error 404, you’ll have to reupload the logo.

It may happen when we edit something else, like the description but I only tried this steps two days ago, and I can confirm tonight that there is a little bug here.

My forum was up to date at the time. And I didn’t see anything related to this issue since. If it’s the case, my apologies.

Missing Category Logo Image
(Jeff Atwood) #2

Hmm @sam does this help you diagnose the other strange upload issue?

(Alan Tan) #3

In your admin staff action logs, can you look for change category settings and see what the category’s logo url was changed to?

If it doesn’t start with /uploads but includes, something is off. I’ve seen this on another forum that we host but I couldn’t replicate the issue and re-uploading the image worked.

ID catégorie: 26
Nouveau (new): //
Précédent (old) : /uploads/default/original/1X/dd3017f3ad31a63a56bbe68e7dfd1240479cde35.png

(This is when I reuploaded the logo img)

You’re right, there is something wrong with the path

(Alan Tan) #5

Can you try upgrading to latest and then reupload the logo? I’m still having trouble trying to reproduce this so it could be a regression that has been fixed.


Updated my Discourse 5 min ago and changed a setting. It still change the path of the logo : (here the chronological order of the logs)

change category settings

Category ID: 18
New: t
Previous: f

change category settings

Category ID: 18
New: //
Previous: /uploads/default/original/2X/c/c62958c95ad579ade24babb9fbb6ad3290be2a14.png

When I reuploaded the logo image :

change category settings

Category ID: 18
New: /uploads/default/original/2X/1/1e8ff2b5d505e8e830b2898c91ced03615f6ed32.png
Previoust: //

(Régis Hanol) #7

I will have a look fist thing tomorrow.

(Régis Hanol) #8

Here’s the fix.

Update to latest, and re-upload any missing images.

(Jeff Atwood) closed #9