Closed pyunramura closed 1 year ago
The text you're seeing is the i18n key names, which are used when a language translation is missing.
Can you try manually setting your language to English and see if that resolves it?
You can place this line inside of your settings.yaml
:
language: en-US
Thanks for getting back to me. I just tried that in the settings and it didn't seem to make any difference. I tried setting both language: en-US
and language: en
and the issue still persists. Only a recreation of the container resolved the issue, as above.
I should also note that I just tested a new instance on a standalone docker host and opened port 3000 directly in order to rule the swarm overlay network and traefik out of potential causes. It was deployed with the same configuration files and unfortunately it has the same issue(s) as before.
Having the same issue as well. Setting language: en-US
in settings.yaml didn't fix it. Only recreating the container fixed this.
I'm experiencing the same issue. Starting from scratch with a fresh container resolves it until I make an edit, then the fields display the i18n key names again.
Also experiencing this issue on docker installs. Anytime a setting is applied, it displays the key names. For me, It only stops when commenting out anything in the settings that is not stock, and recreating.
Still cannot reproduce this, its not obvious to me what might be causing it. Does anyone have anything helpful displayed in the container or browser logs? How about with log level set to debug
?
How about with log level set to
debug
?
Logging set to debug did not reveal any more info about the issue during my testing unfortunately, but.
I did manage to narrow down the cause of the issue during testing today, though I'm still not sure of a possible workaround yet.
In order to attempt getting some useful debug logs, I recreated the docker standalone instance with the standard compose file as follows:
---
version: '3.8'
services:
homepage:
image: ghcr.io/benphelps/homepage:v0.4.18
container_name: homepage
volumes:
- ./homepage/config:/app/config
ports:
- 3000:3000
environment:
LOG_LEVEL: debug
With the config above, the instance proceeded to create a new set of configuration files when the page was loaded as expected. When the configuration was reloaded through the dedicated button or updated by modifying the config files, everything worked perfectly as it should, the i88n issue did not present itself.
I then copied my production config files into the same location and overwrote the ones that were previously created on the first page load. As above, everything worked as it should.
Finally I copied my production assets directory containing icons and images directories into ./homepage/public
and modified the compose file as below:
---
version: '3.8'
services:
homepage:
image: ghcr.io/benphelps/homepage:v0.4.18
container_name: homepage
volumes:
- ./homepage/config:/app/config
- ./homepage/public:/app/public
ports:
- 3000:3000
environment:
LOG_LEVEL: debug
Note: The only change above is the addition of the - ./homepage/public:/app/public
volume bind-mount.
With this config I was able to reproduce the original issue. When the container is started, all of the fields display correctly, but upon reload using the dedicated button, or on configuration change, the i88n fields were displayed instead of the appropriate values.
After this discovery I suspected there was something in my public
volume bind-mount that may be causing the issue, so as before, I recreated the container from scratch, rm -rf
ing everything under ./homepage
, proceeded to mkdir ./hompage/{config,public}
, then with the "clean" config
volume bind-mount, let the container create a new set of config files using the first compose file above. As expected, reloading and modifying config files worked fine. I then tore down the deployment and brought it up again with the second compose file above that contains the - ./homepage/public:/app/public
volume bind-mount. This again reproduced the issue.
I also tried with a directory structure like below with the appropriate declarations in the compose file, but it seemed to make no difference. The issue persisted.
- ./homepage
---- /config
- ./homepage1
---- /public
I also tried reproducing the issue with the public
directory volume bind-mounted to /mnt/public
within the container to attempt to isolate docker itself as contributing to the issue. Then mounting the public
directory to /app/public-test
. In both cases, the app did not produce the issue. So it most likely has something to so with how the app is interacting with the /app/public
directory within the container.
At this point I've managed to consistently reproduce the issue on a docker standalone instance with a locally bind-mounted config directory. I've also tried the same steps but with my nfs mounted "data" directories in use by my swarm cluster, and produced the same results as above, so that can be ruled out.
I'm still uncertain of the underlying cause of the issue, or a potential workaround that doesn't involve not having a volume definition for the /app/public
directory. Perhaps the other users that are reporting this issue can give a larger sample size as to if removing the /app/public
volume definition from their compose file can relieve the issue, if one is declared at all.
Removing /app/public
did the trick for me. Nice job, pyunramura!
I miss my icons folder tho.
Ah, OP did not post their docker config compose / run. If that’s true for OP too then yes that’s the issue.
You shouldn’t map the entire public dir, you map a subdir eg /app/public/images see https://gethomepage.dev/en/configs/settings/#background-image
Not OP, but changing my volumes:
to - ./images:/app/public/images
seems to have fixed this issue. Not sure if it's mentioned somewhere in the wiki that you have to map to a specific directory, but if not, I think it should. @shamoon the link you provided seems more like a suggestion to have /images
in /public
. I would've probably figured it out if I had added a background to my /images
though lol
Sure can add a note but I don’t think it suggests anywhere to do that so I’m not sure where the idea came from in the first place?
Thanks! As an FYI, this is what caused the misunderstanding:
"you may pass the path to a local image relative to the
/app/public
directory, which could be configured like this"
Makes it sounds like the example below is a suggestion, but not necessary. Could possibly help to change it to:
"you may pass the path to a local image relative to the
/app/public/images
directory, which could be configured like this"
Not a big change, but imo, this would make it clearer that /images
needs to be used and is not just there for clarity, or preference.
Sure thing, I updated the docs.
Thanks all
If that’s true for OP too then yes that’s the issue.
Confirmed that mapping /public/images
and public/icons
as separate volume mounts solves the issue.
Thanks a lot for the clarification. In retrospect, failing to submit the docker-compose file as a part of the problematic config was a big oversight on my part. My apologies for any grief it caused dealing with this issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.
Description
Issue:
I'm configuring a brand new deployment and having a problem with the fields in homepage, Screencap below.
https://user-images.githubusercontent.com/35285259/202796718-c419c332-a281-4c65-a0e1-8dcd0b0993dd.mp4
This issue seems to occur anytime I reload the page with the dedicated reload button or if I make a change to any of the configuration files. Reloading the page, deleting the cache and reloading (Ctrl+Shift-R), closing the window and opening again, using a different browser, and opening the page on a different machine do not resolve the issue. The only thing I've found that works is recreating the container.
I've found that disabling all service widgets do not resolve the issue either. This problem occurs even after first deployment with an empty configuration directory.
On a side note, changes to the
settings.yanl
file are not being applied on first use after the container is started. The only way I've found to apply options in the settings.yaml is to use the dedicated reload button or to make a configuration change. But that also causes the issue above and is a secondary issue for me atm.Notes about environment:
The config directory is bind mounted into the container where both the app and the folder/files are using root permissions, but I have also tried with running with
user: <user>:<group>
in the compose file as well with appropriate config directory/file permissions wih no difference in behavior.The app is being reverse proxied with Traefik using the "secureHeaders" middleware
Traefik dynamic config
This is also deployed on a docker swarm cluster, though not sure if It's relevant to the issue.
Container Logs:
Note: there were no other reported errors after either using the dedicated reload button or making a config change. The errors below are present on container start.
logs/homepage.log
Configuration files:
bookmarks.yaml
docker.yaml
services.yaml
settings.yaml
widgets.yaml
Steps to reproduce
homepage version
v0.4.18 (4ea2798)
Installation method
Docker
Configuration
No response
Other
No response