How to replace SCSS vars in Themes -> Uploads?

I’ve been customizing my theme in Admin -> Themes… Lots of CSS/HTML changes.

I also have a few Themes -> Uploads:

  • $Background-Tile-White: [WhiteCarbon50x50x2.png]
  • $Background-Tile-Black: [BlackCarbon50x50x2.png]

I’ve deleted “Background-Tile-Black” and “Background-Tile-White” and replaced them with new images, but I still see the old images are actually delivered. I’ve tried using another browser, clearing the cache, and restarting, so I don’t think it’s a browser caching issue.

By contrast, regular CSS changes happen very fast…

Anyone else had problems replacing resources in Themes -> Uploads?

When I inspect the element on the page, the OLD resource that I already deleted that was connected to $Background-Tile-White is pulled in rather than the new one…

1 Like

I believe that’s a cache issue on the server side. I remember I ran into something similar to this and my workaround was to re-save my SCSS by adding a new line character and save it. Have you tried that?

6 Likes

@Osama I’m having this issue too:
Trust-Level Avatar Flair

What do you mean by adding new line character? Should i just add \r to end of old SCSS and save?

1 Like

I could’ve said that better. What I mean is change up your CSS a bit (something as simple as adding or removing a space or a new line will do) so that it becomes “different” from what it was and save your CSS.

4 Likes

I’ve experienced the same issue; updating the image for a trust level seems to have no effect. However, I’ve noticed if I change the flair position it works, unless I revert back to the original position it was in when I added the image. I’ve tried altering CSS and saving, but no dice.

1 Like

Fixed in:

https://github.com/discourse/discourse/pull/5992

Thanks for reporting @ryanerwin :sunny:

12 Likes