Crash when saving general settings without selecting a language
If in a fresh profile I change a few settings on the General Settings page and click save, an error box pops up at the bottom left corner of the screen, and opening Vikunja in a new tab will result in a blank, white page.
In the latter case (but probably the former too), the web console will have the following unhandled error logged:
Uncaught (in promise) Error: Unknown variable dynamic import: ./lang/<unset>.json
If I still have the General Settings menu opened in a tab, selecting something from the list and clicking save solves the problem.
Until I explicitly set a language, the dropdown did not have a value selected (or at least the collapsed view of it was blank).
Vikunja Frontend Version
Vikunja API Version
Browser and version
Can you reproduce the bug on the Vikunja demo site?
Before changing a setting:
After changing a setting:
It's interesting you were able to create an account without a language set. By default, it uses the language you set in the browser. Even when logging the user in it will check if you have a language saved and then save that.
Does the user have a language saved on the db?
The time zone should be set as well but isn't in your screenshot.
I have made a dump with
mysqldump -u root -p vikunja to check, and it seems they arent. This is in the the place of the language:
And this is in the place of the time zone:
'<time zone set at service.timezone>'
This is the full record for the user:
(3,'','asdasd','$2a$11$gdBpyNMw3QeDPbIbcDKNsuFWjr5 V2PA7IA8YeRf8p8voimfUoEqZS','email@example.com',0,'initials',0,'local','',0,0,0,1,'9:00',0,1,'<unset>','<time zone set at service.timezone>',NULL,NULL,0,'2023-01-25 15:50:22','2023-01-25 15:50:22')
The value of the language cell seemed very familiar, so I checked my config.yml file.
It seems this is partly on me: I use this as the base for my configuration, and I have left
defaultsettings.timezone the way it was originally.
Honestly I don't know what I expected from leaving them that way.
Yeah that looks like it is the cause here. To fix this, set the language and timezone to
null in the database, then reload the frontend. And if you don't want to set the default settings in the server config file, remove the values or comment them out.
Deleting a branch is permanent. It CANNOT be undone. Continue?