[Bug]: Web UI sorts files with double extensions (e.g. .mp3.txt) incorrectly

Offen
#66,943 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript
Bereich
frontend

Rechercherichtung

The payload names no source file, so start by finding the name-sort comparison used by the Files web UI in the frontend code. Reproduce with the four empty files from the steps (datei-a.mp3, datei-a.mp3.txt, datei-b.mp3, datei-b.mp3.txt) and confirm the current order. Done when name-ascending sorting places each .mp3.txt directly after its .mp3 without breaking other name sorts. The issue also suggests the change could be optional, which a maintainer should confirm before you implement it.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

0. Needs triage 35-feedback bug
⚠️ This issue respects the following points: ⚠️
  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description

In the Files web interface (Nextcloud Hub 26 Summer 35.0.3), files with double extensions are not sorted together with their corresponding base files. Instead, the web UI separates the basename before the last dot and ignores/deprioritizes the dot during comparison, grouping all .mp3 files before .mp3.txt files.
Both the Windows Desktop client and the Android client sort the full filename string naturally and display .mp3.txt right below .mp3.

Steps to reproduce
  1. Open a folder in the Nextcloud 35 Files web app.

  2. Create or upload the following four empty files:
    • datei-a.mp3
    • datei-a.mp3.txt
    • datei-b.mp3
    • datei-b.mp3.txt

  3. Sort the list by Name (ascending).

Actual behavior:
The web UI sorts by the substring before the last extension (datei-a, datei-b, datei-a.mp3, datei-b.mp3), resulting in:
• datei-a.mp3
• datei-b.mp3
• datei-a.mp3.txt
• datei-b.mp3.txt

It occurs with all multiple file extensions.

Expected behavior

Expected behavior:
Files should be sorted by their full filename string, matching the behavior of desktop OS file managers and Nextcloud mobile/desktop clients:
• datei-a.mp3
• datei-a.mp3.txt
• datei-b.mp3
• datei-b.mp3.txt

Nextcloud Server version

35

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cumulus.hrs19.de"
        ],
        "serverid": "cumulus-single-server",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cumulus.hrs19.de",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "35.0.3.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "maintenance": false,
        "integrity.ignore.missing.app.signature": [
            "theme-hrs19"
        ],
        "theme": "",
        "loglevel": 0,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "allow_user_to_change_mail_address": "",
        "default_phone_region": "DE",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "maintenance_window_start": 2,
        "auth.bruteforce.protection.enabled": true,
        "blacklisted_passwords": [],
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/",
            "\n"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "app_install_overwrite": [],
        "lost_password_link": "disabled",
        "appstoreenabled": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/cumulus.hrs19.de\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/cumulus.hrs19.de\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "skeletondirectory": "\/var\/www\/html\/cumulus.hrs19.de\/custom_skeleton"
    }
}
List of activated Apps
Enabled:
  - activity: 8.0.0
  - appstore: 2.0.0
  - bruteforcesettings: 8.0.0
  - calendar: 6.7.0
  - cloud_federation_api: 2.0.0
  - comments: 2.0.0
  - contacts: 8.10.0
  - contactsinteraction: 2.0.0
  - dashboard: 8.0.0
  - dav: 2.0.1
  - federatedfilesharing: 2.0.0
  - federation: 2.0.0
  - files: 3.0.0
  - files_downloadlimit: 5.3.0
  - files_lock: 35.0.1
  - files_pdfviewer: 8.0.0
  - files_reminders: 2.0.0
  - files_sharing: 2.0.1
  - files_trashbin: 2.0.0
  - files_versions: 2.0.0
  - firstrunwizard: 8.0.0
  - guests: 4.10.1
  - logreader: 8.0.0
  - lookup_server_connector: 2.0.0
  - nextcloud_announcements: 7.0.0
  - notifications: 8.0.1
  - notify_push: 1.4.2
  - oauth2: 2.0.0
  - office: 1.1.0
  - password_policy: 7.0.0
  - photos: 8.0.0
  - privacy: 7.0.0
  - profile: 2.0.0
  - provisioning_api: 2.0.0
  - recommendations: 8.0.0
  - related_resources: 6.0.0
  - richdocuments: 12.0.2
  - serverinfo: 7.0.0
  - settings: 2.0.0
  - sharebymail: 2.0.0
  - sharing: 1.0.5
  - spreed: 25.0.8
  - support: 7.0.0
  - survey_client: 7.0.0
  - systemtags: 2.0.0
  - tasks: 0.18.1
  - text: 9.0.2
  - theming: 3.0.0
  - twofactor_backupcodes: 2.0.0
  - twofactor_totp: 17.1.0
  - updatenotification: 2.0.0
  - user_status: 2.0.0
  - viewer: 8.0.0
  - weather_status: 2.0.0
  - webhook_listeners: 2.0.0
  - workflowengine: 3.0.0
Disabled:
  - admin_audit: 2.0.0
  - app_api: 35.0.0 (installed 32.0.0)
  - circles: 35.0.0 (installed 34.0.0)
  - encryption: 3.0.1
  - files_external: 2.0.0 (installed 1.17.0)
  - files_texteditor: 2.15.1 (installed 2.15.1)
  - suspicious_login: 13.0.0
  - transcriptionfolders: 0.3.0 (installed 0.3.0)
  - twofactor_nextcloud_notification: 9.0.0
  - user_ldap: 2.0.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
There are no log entries for this bug because it's a sorting problem in Javascript.
Additional info

This Bug occurs in all current major browsers under Windows 11 (the operation system of my "clients")

I work with several public-sector institutions, and in their workflows, multiple file extensions are an integral part of the process. Files with the same base name are handled as a group. Selecting them one by one from a potentially long list is, frankly, pointless.

And before anyone suggests that these institutions should change their workflows — can you think of anything more immovable than a bureaucrat?

In my personal opinion, this type of sorting should, at best, be an optional feature—it should certainly never be the default.

Vorherrschende Sprache
PHP
Sterne
37.6k
Forks
5.4k
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
623

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/server

Alle Issues in nextcloud/server

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.