The dashboard widget onclick redirect to localhost

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 28.0.3
Operating system and version (eg, Ubuntu 20.04): Linux 5.10.60-qnap x86_64
PHP version (eg, 7.4): 8.3.4

Installed with the image: linuxserver/nextcloud

The issue you are facing:
Just like the issue on github: dashboard, widget | wrong url for card · Issue #4139 · nextcloud/deck · GitHub
When use dashboard to display deck’s info, the card widget link is like : https://$hostname/apps/deck#/board/2/card/9
As there is no slash before the ‘#’, on click it will go to this url: https://localhost/apps/deck#/board/2/card/9
What should I do to make it to the right host?

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. open dashboard
  2. click on card widget
  3. redirect to localhost

The output of your Nextcloud log in Admin > Logging:

There is no error log

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

'overwritehost' => '$myhost:$myport',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/',
  'overwrite.cli.url' => '$myhost:$myport/',

I understand what you’re saying about the deck# lacking the slash, but it’s been that way for a long time and works either way (but should probably get cleaned up).

But I don’t see how that would result in localhost ending in the generated URL. Is this the only place where you see localhost show up in your URLs?

Is this while you’re using https://$myhost:$myport/ to access your instance? You’re not otherwise using localhost in any way, correct?

Can you share the full output of occ config:list system?

It’s not the only place to see localhost show up in urls.
Like photo > maps, it looks the same way.
It’s like when need to jump to another apps it’ll happen.

I’m using my own host and custom port to access my instance, with a reverse proxy
And my full output of occ config:list system is like below, with the real host and port replaced by $my_host and $my_port

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.50.1",
            "192.168.50.196",
        ],
        "dbtype": "mysql",
        "version": "28.0.3.2",
        "default_language": "cn",
        "default_phone_region": "CN",
        "default_timezone": "Asia\/Shanghai",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "$MY_HOST:$MY_PORT",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "https:\/\/$MY_HOST:$MY_PORT\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "preview_ffmpeg_path": "\/usr\/bin\/ffmpeg",
        "memories.exiftool": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-musl",
        "memories.vod.path": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0
        },
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\Movie",
            "OC\\Preview\\TIFF"
        ],
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memories.vod.vaapi": true,
        "maintenance": false,
        "check_for_working_wellknown_setup": false,
        "maintenance_window_start": 1,
        "memories.db.triggers.fcu": true
    }
}