Skip to content

[BUG] Theme is not correctly saved and reset at each page refresh #774

@Antiz96

Description

@Antiz96

Environment

Self-Hosted (Docker)

Version

2.1.0

Describe the problem

Hi,

Context

I'm using dashy in a docker container on a raspberry Pi 4 (using the latest image).

Run command :

sudo docker run -d -p 8080:80 -v /opt/dashy/conf.yml:/app/public/conf.yml --name dashy --restart=always lissy93/dashy:latest

My conf.yml file is visible here

The issue

Since a few days, I have an issue that (I think) is happening since the latest update to the docker image (V2.1.0).
More on that in the additional info field.

What is not working

As you can see, I've set the "Adventure" theme is my conf.yml file (line 11). However, when I launch dashy through my web browser, it shows the default theme (even tho the theme is indeed automatically set to "Adventure" by my configuration file):

Bug_Dashy_1

Re-selecting the "Adventure" theme manually from the "theme" drop down list makes it appears correctly.
However, refreshing/reloading the page makes Dashy fall back down to the default theme (while still having the "Adventure" theme selected, just like on the above screenshot).

-!- It worth mentioning that I initially had this issue with the "Adventure" theme as this is the one I'm using, but I've tried to set other ones in my config file for testing purposes and I had the exact same behavior. According to that, I guess that this issue goes with all themes, not specifically the "Adventure" one. I'll continue to use the "Adventure" theme as an example anyway but it could have been another one -!-

Step to reproduce

Set the "Adventure" theme in the conf.yml file with the following snippet:

appConfig:
  theme: Adventure

Run the Dashy's latest docker image and mount the configuration file as "/app/public/conf.yml":

sudo docker run -d -p 8080:80 -v /opt/dashy/conf.yml:/app/public/conf.yml --name dashy --restart=always lissy93/dashy:latest

Check the Dashy's web page.
The "Adventure" theme is indeed selected but the default theme is shown instead. Re-selecting it manually from the drop down menu makes it appears correctly but refreshing/reloading the page makes it fall back to the default theme, even tho "Adventure" is still selected (at least in my case 😄).

Expected result

Having the "Adventure" theme correctly shown when launching and reloading/refreshing Dashy's web page without having to manually re-select it.

Thank you

Thanks a lot for your awesome work ! Dashy's amazing 😄

Additional info

  • I said I think this issue is happening since the latest docker image (V2.1.0) because I think there's 2 separate parts of this issue:
    Indeed, I'm quite sure that I had the bug showing the default theme instead of the one I chose in my config file (even tho it is selected in the drop down menu) before the release of the latest docker image (V2.1.0).
    However, at that time, I had to re-select my theme manually only one time after a docker run command (so either after the initial launch of Dashy or after an update). I didn't have to redo that until the next docker run command (meaning until the next update).
    Having to re-select my theme manually each time the page is refreshed/reload is however an issue introduced since the latest docker image (V2.1.0) for me.

  • As I said earlier, I could reproduce this behavior using other themes than "Adventure" in my config file. So it is not related to that particular theme I guess.

  • As I said earlier as well, thanks a lot for your awesome work ! 😄

Please tick the boxes

Metadata

Metadata

Assignees

Labels

❕ Medium Priority[ISSUE] Needs to be dealt with at some point🐛 Bug[ISSUE] Ticket describing something that isn't working📌 Keep Open[ISSUE][PR] Prevent auto-closing

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions