Skip to content

[Bug]: ImageViewer for public shares is not working inside subfolders. #2977

@da-wilky

Description

@da-wilky

⚠️ This issue respects the following points: ⚠️

Bug description

I have a folder with multiple subfolders that got images in it, like:
Parent

  • Sub1
    • Image1.jpg
    • Image2.jpg
    • ...
  • Sub2
    • Image1.jpg
    • ...
  • ...

Inside Nextcloud I can open and view those images inside the Viewer.
Using a Public Share for a Sub-Folder (e.g. Sub1) I can also use the Viewer to click through the images.

BUG:
Using a Public Share for the Parent Folder I can no longer click through the Images inside the subfolder. Clicking on an Image loads it into the Viewer, but I cant show the next image by clicking the arrow/arrow key.
On Image load the Browser Console shows an error:

Could not open file /hello/IMG_3105.JPG TypeError: can't access property "filename", h is undefined
    currentIndex Viewer.vue:800
    openFileInfo Viewer.vue:800
[Viewer.vue:681:1](/apps/viewer/src/views/Viewer.vue)
    openFile Viewer.vue:681

On each arrow click the following error occurs:

TypeError: can't access property "mime", e is undefined
    openFileFromList Viewer.vue:818
    next Viewer.vue:1085
    VueJS 4
    next NcModal.mjs:431
    handleKeydown NcModal.mjs:473

Steps to reproduce

  1. Load Images into a folder inside Nextcloud.
  2. Share the parent folder of the folder via public link.
  3. Open the public link, go into the folder, open an image, try to click to the next image.

Expected behavior

The next image should be displayed inside the viewer.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

Other

Web server

Other

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "theme": "mine",
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "default_phone_region": "DE",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 1,
        "maintenance": false,
        "updater.release.channel": "stable",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "share_folder": "\/F\u00fcr mich geteilt",
        "preview_max_memory": 256,
        "default_language": "de",
        "default_locale": "de_DE",
        "app_install_overwrite": [
            "impersonate"
        ],
        "skeletondirectory": "",
        "templatedirectory": "",
        "trashbin_retention_obligation": "30, 180",
        "max_chunk_size": 78643200,
        "allow_user_to_change_display_name": false,
        "lost_password_link": "disabled",
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "session_relaxed_expiry": false,
        "session_keepalive": true,
        "auto_logout": false,
        "oidc_login_provider_url": "***REMOVED SENSITIVE VALUE***",
        "oidc_login_client_id": "***REMOVED SENSITIVE VALUE***",
        "oidc_login_client_secret": "***REMOVED SENSITIVE VALUE***",
        "oidc_login_auto_redirect": true,
        "oidc_login_end_session_redirect": false,
        "oidc_login_logout_url": "***REMOVED SENSITIVE VALUE***",
        "oidc_login_button_text": "Log in with OpenID",
        "oidc_login_hide_password_form": true,
        "oidc_login_use_id_token": false,
        "oidc_login_attributes": {
            "id": "preferred_username",
            "name": "name",
            "mail": "email",
            "groups": "nextcloudgroups"
        },
        "oidc_login_use_external_storage": false,
        "oidc_login_scope": "openid",
        "oidc_login_disable_registration": false,
        "oidc_login_redir_fallback": false,
        "oidc_login_tls_verify": true,
        "oidc_create_groups": false,
        "oidc_login_public_key_caching_time": 86400,
        "oidc_login_min_time_between_jwks_requests": 10,
        "oidc_login_well_known_caching_time": 86400,
        "oidc_login_webdav_enabled": false,
        "oidc_login_password_authentication": false,
        "oidc_login_update_avatar": false,
        "oidc_login_skip_proxy": false,
        "oidc_login_code_challenge_method": "",
        "maintenance_window_start": 3,
        "upgrade.disable-web": true,
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64"
    }
}

List of activated Apps

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - announcementcenter: 7.2.1
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.5.4
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.3.2
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - external: 6.0.2
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - groupfolders: 19.1.5
  - impersonate: 2.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - memories: 7.6.2
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - oidc_login: 3.2.2
  - onlyoffice: 9.10.0
  - password_policy: 3.0.0
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - theming_customcss: 1.18.0
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - deck: 1.15.2 (installed 1.15.2)
  - encryption: 2.19.0
  - files_external: 1.23.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - forms: 5.1.2 (installed 5.1.2)
  - mediadc: 0.4.0 (installed 0.4.0)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0
  - weather_status: 1.11.0 (installed 1.0.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Additional info

I am using the docker nextcloud image (nextcloud:production-apache) (currently 31.0.9).

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions