Website Dark theme does not stay set

Rebel Scum

New member
If I set the website to dark theme, it stays in that theme only as long as I leave the tab open. If I close the tab and open Heliosphere in a new tab, it reverts to the system theme. If I then go into settings, the setting is still set to dark but I have to set it to something else and then back to dark to make it actually show the theme properly.

The cause of this appears to be a missing data-theme="dark" attribute on the root html element that's not being added when the page loads. When I change the setting it gets added then, and likewise if I change it back to system it gets removed. And if I manually edit it out the website instantly reverts to system theme too.

For reference in case it matters, I'm on Firefox v140.0.2 which is the latest version at the time of writing this post.
 
This screenshot is with Firefox in troubleshooting mode. As you can see it's set to dark in the dropdown, but not showing the dark theme. I also tried it in Edge just to see, and the same thing happens there - if I set it, it shows properly until I close the tab but when I open the site in a new tab it's light again. However, it does seem to only happen if not logged in - I never bothered with an account until now since I never needed it just to download mods, but I made one just to see if that affected it and once logged in it stays dark like it should. It also instantly reverts to light if I log out, too.

bug.webp
 
Ah, yes, not being logged in enables some aggressive caching on the server side. I'll have to look at it.
 
Back
Top