[GH-ISSUE #76] User registration fails due to missing timezone #5938

Closed
opened 2026-04-20 16:23:56 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @nebulade on GitHub (Jul 7, 2023).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/76

Description

Fresh and vanilla instance fails to register new users from the register web view. The logs contain the following resuliting in 500 status code.

RegisterUser 261 unknown time zone <time zone set at service.timezone>

It does not seem to matter if service.timezone is set in the config.yml or not. Looking at the docs and code, even if unset it should fallback to GMT which it was doing fine in the previous version.

The user is actually created and the welcome mail is sent, however it subsequently fails during login since the response when querying the user profile after login contains literally timezone: "<time zone set at service.timezone>" (with the <>) in the settings object.

Vikunja Frontend Version

0.21.0

Vikunja API Version

0.21.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @nebulade on GitHub (Jul 7, 2023). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/76 ### Description Fresh and vanilla instance fails to register new users from the register web view. The logs contain the following resuliting in 500 status code. ``` RegisterUser 261 unknown time zone <time zone set at service.timezone> ``` It does not seem to matter if `service.timezone` is set in the config.yml or not. Looking at the docs and code, even if unset it should fallback to `GMT ` which it was doing fine in the previous version. The user is actually created and the welcome mail is sent, however it subsequently fails during login since the response when querying the user profile after login contains literally `timezone: "<time zone set at service.timezone>"` (with the `<>`) in the `settings` object. ### Vikunja Frontend Version 0.21.0 ### Vikunja API Version 0.21.0 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
Author
Owner

@nebulade commented on GitHub (Jul 7, 2023):

This was resolved by realizing that the config.yml actually has those strings set at e5cd4897d6/config.yml.sample (L333)

Clearing those makes it fallback correctly to the service. properties. Maybe the sample file could have empty values and the current ones only as comments?

<!-- gh-comment-id:1625650932 --> @nebulade commented on GitHub (Jul 7, 2023): This was resolved by realizing that the config.yml actually has those strings set at https://github.com/go-vikunja/api/blob/e5cd4897d6be52c5bacb39a4ddae322921bfc0ee/config.yml.sample#L333 Clearing those makes it fallback correctly to the service. properties. Maybe the sample file could have empty values and the current ones only as comments?
Author
Owner

@kolaente commented on GitHub (Jul 7, 2023):

Maybe the sample file could have empty values and the current ones only as comments?

Yeah that's one improvement we'd like to make. The current sample configuration is also used to generate the config docs and this was the easiest way to let it handle default values.

<!-- gh-comment-id:1625702001 --> @kolaente commented on GitHub (Jul 7, 2023): > Maybe the sample file could have empty values and the current ones only as comments? Yeah that's one improvement we'd like to make. The current sample configuration is also used to generate the [config docs](https://vikunja.io/docs/config-options/) and this was the easiest way to let it handle default values.
Author
Owner

@kolinblue commented on GitHub (Sep 13, 2024):

This error pops up regardless of what's set in the config.yml. It only started working once I manually set the env variables when I started it. (Non docker version)

<!-- gh-comment-id:2347969828 --> @kolinblue commented on GitHub (Sep 13, 2024): This error pops up regardless of what's set in the config.yml. It only started working once I manually set the env variables when I started it. (Non docker version)
Author
Owner

@kolaente commented on GitHub (Sep 13, 2024):

The config value is only read during creation of the user. Once the user exists, the setting is persisted into the database.

<!-- gh-comment-id:2348326474 --> @kolaente commented on GitHub (Sep 13, 2024): The config value is only read during creation of the user. Once the user exists, the setting is persisted into the database.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#5938