RocketChat / RocketChat/Rocket.Chat
Setting OVERWRITE_SETTING_theme-custom-css env variable doesn't take effect
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I wanted to set custom css without need to do this from UI. Similarly as other settings OVERWRITE_SETTING_theme-custom-css was set in env variables, but after starting rocket chat in Administration -> Layout -> custom Css value provided in env variable is not set.
No related errors in log.
Steps to reproduce:
- Add OVERWRITE_SETTING_theme-custom-css: "test content" to environment section of rocket chat compose.yml file.
- Start RocketChat
- Go to Administration -> Layout -> custom Css
Expected behavior:
Custom css value is "test content"
Actual behavior:
Custom css value is empty
Server Setup Information:
- Version of Rocket.Chat Server: 6.1.6
- Operating System: Ubuntu
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.21.2 - x64
- MongoDB Version: wiredTiger
Client Setup Information
- Desktop App or Browser Version: Mozilla FF
- Operating System: Ubuntu
Additional context
It's worth to mention that other similar settings like "OVERWRITE_SETTING_Custom_Script_On_Logout" are passed correctly.
Also setting theme-custom-css via rest api works correctly.
Seems that issue is caused by '-' character in setting name and because of that it cannot be passed via env variables.
Relevant logs:
No relevant logs found.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Rocket.Chat's environment-variable setting override handling, comparing theme-custom-css with Custom_Script_On_Logout and the REST API path. Reproduce the issue with the compose environment described in the report; done when OVERWRITE_SETTING_theme-custom-css populates the custom CSS setting and the behavior is covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mongodb, node.js, typescript
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100