owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.38k stars 182 forks source link

OCIS 3.0 branding change logo and Theme not working #7033

Closed cheegui closed 1 year ago

cheegui commented 1 year ago

Describe the bug

We are running OCIS 3.0 binary on Ubuntu 22.04 and were unable to change the logo in Administration Settings -> Appearance -> Logo. The page refreshed by itself after the upload but nothing's changed. Manually refreshing the browser and restarted OCIS server didn't work. The new logo file was successfully uploaded to the OCIS_BASE_DATA_PATH/assets/branding folder on the server though. We added these environment variables WEB_UI_THEME_SERVER=https://localhost:9200 and WEB_UI_THEME_PATH=/themes/owncloud/theme.json to the ocis.env and did systemctl daemon-reload and systemctl restart ocis but to no avail. Suspecting that it might be a problem with our new logo image file, we modified the "name" and "slogan" in the theme.json file that was automatically created in OCIS_BASE_DATA_PATH/assets/themes/owncloud/ on the server when we uploaded our logo file. But nothing's changed. We also tried using a config.json (using the examples in https://doc.owncloud.com/) but got the default ownCloud blue background page when going to the website.

Steps to reproduce

Steps to reproduce the behavior:

  1. Install the OCIS 3.0 binary on Ubuntu 22.04. Set up nginx proxy server.
  2. Login as admin and go to Administration Settings -> Appearance -> Logo and upload a new logo file. (note that .svg file is not accepted. we uploaded both .png and jpg)
  3. Change the "name" and "slogan" in OCIS_BASE_DATA_PATH/assets/themes/owncloud/theme.json and either add WEB_UI_THEME_SERVER=https://localhost:9200 and WEB_UI_THEME_PATH=/themes/owncloud/theme.json to the ocis.env OR add a config.json (with this line "theme": "https://localhost:9200/themes/owncloud/theme.json"). systemctl restart ocis.
  4. Go to the ocis website and nothing's changed. It is still using the default theme.

Expected behavior

The original Owncloud logo should be replaced by our own logo after we upload our new logo file. The name and slogan of our website should change from "ownCloud" and "a safe for all your data" to our own name and slogan after we create our own theme.json or modify the theme.json automatically created by ocis after a new logo is uploaded.

Actual behavior

The logo was successfully loaded to the server but the website still displayed the original ownCloud logo. Changing the "name" and "slogon" in theme.json didn't take effect.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

``` root@ocis:/etc/ocis# cat ocis.yaml token_manager: jwt_secret: 'xxxx' machine_auth_api_key: xxxx system_user_api_key: xxxx transfer_secret: xxxx system_user_id: xxxx admin_user_id: xxxx graph: application: id: xxxx events: tls_insecure: false spaces: insecure: false identity: ldap: bind_password: xxxx idp: ldap: bind_password: xxxx idm: service_user_passwords: admin_password: xxxx idm_password: xxxx reva_password: xxxx idp_password: xxxx proxy: oidc: insecure: false insecure_backends: false frontend: archiver: insecure: false auth_basic: auth_providers: ldap: bind_password: xxxx auth_bearer: auth_providers: oidc: insecure: false users: drivers: ldap: bind_password: xxxx groups: drivers: ldap: bind_password: xxxx ocdav: insecure: false thumbnails: thumbnail: transfer_secret: xxxx webdav_allow_insecure: false cs3_allow_insecure: false search: events: tls_insecure: false audit: events: tls_insecure: false sharing: events: tls_insecure: false storage_users: events: tls_insecure: false mount_id: xxxx notifications: notifications: events: tls_insecure: false nats: nats: tls_skip_verify_client_cert: false gateway: storage_registry: storage_users_mount_id: xxxx root@ocis:/etc/ocis# ``` ``` root@ocis:/etc/ocis# cat ocis.env OCIS_INSECURE=true PROXY_TLS=false OCIS_URL=https://ocis.xxxx.com PROXY_HTTP_ADDR=0.0.0.0:9200 IDM_CREATE_DEMO_USERS=true OCIS_LOG_LEVEL=warn OCIS_CONFIG_DIR=/etc/ocis OCIS_BASE_DATA_PATH=/var/ocis WEB_UI_THEME_SERVER=https://localhost:9200 WEB_UI_THEME_PATH=/themes/owncloud/theme.json root@ocis:/etc/ocis# ``` ``` We also tried a config.json but got the ownCloud default blue screen. { "server" : "", "theme": "https://localhost:9200/themes/owncloud/theme.json", "auth": { "clientId": "", "url": "", "authUrl": "" }, "apps" : [ "files", "preview", "pdf-viewer", "search", "text-editor", "draw-io", "external", "admin-settings" ], "applications" : [] } We tried different values in the server and url above. root@ocis:/etc/ocis# cat ocis.env OCIS_INSECURE=true PROXY_TLS=false OCIS_URL=https://ocis.function.com PROXY_HTTP_ADDR=0.0.0.0:9200 IDM_CREATE_DEMO_USERS=true OCIS_LOG_LEVEL=warn OCIS_CONFIG_DIR=/etc/ocis OCIS_BASE_DATA_PATH=/var/ocis WEB_UI_CONFIG_FILE=/etc/ocis/config.json root@ocis:/etc/ocis# ``` ```console OCIS_XXX=somevalue OCIS_YYY=somevalue PROXY_XXX=somevalue ```

Additional context

Thank you very much in advance.

cheegui commented 1 year ago

It's okay. Finally got it to work with this:


OCIS_INSECURE=true
PROXY_TLS=false
OCIS_URL=https://ocis.example.com
PROXY_HTTP_ADDR=0.0.0.0:9200
IDM_CREATE_DEMO_USERS=true
OCIS_LOG_LEVEL=debug
OCIS_CONFIG_DIR=/etc/ocis
OCIS_BASE_DATA_PATH=/var/ocis
WEB_UI_THEME_PATH=/themes/owncloud/theme.json

The logo image file has to be around the same size as the default 436 x 207. The slogan is only changed in the redirect page but not in the login page. Still figuring this out...

cheegui commented 1 year ago

closed. works in redirect page and later but not in the login page.

cheegui commented 1 year ago

closed

micbar commented 1 year ago

That observation is correct. The login page belongs to the idP and is statically themed. The default is libreConnect

if you are using keycloak, the login page would be rendered by keycloak. We are using an owncloud theme for that.