[Bug]: Web UI sorts files with double extensions (e.g. .mp3.txt) incorrectly
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
⚠️ 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
-
Open a folder in the Nextcloud 35 Files web app.
-
Create or upload the following four empty files:
• datei-a.mp3
• datei-a.mp3.txt
• datei-b.mp3
• datei-b.mp3.txt -
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.
- 主要语言
- PHP
- 星标
- 37.6k
- 派生
- 5.4k
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 623
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/server 的其他 Issue
-
0. Needs triage 35-feedback bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
34-feedback
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404可能已有人在做 @lazerg 于 7 天前认领。 未关闭35-feedback
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher race可能已有人在做 @lazerg 于 7 天前认领。 未关闭35-feedback
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
相似的 Issue
-
area: tests area: user refactoring
难度 2/5 1-3 小时 新手友好度 85/100
nplhse/collaborative-ivena-statistics#1845 ·
维护者通常 1 天内回复
-
[Sync EN] filesystem: document the ValueError of fgets(), file_get_contents(), and touch() (#6167)未关闭sync-en
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
sync-en
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
Перевод устарел
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
Documentation Feature: Events / Calendar
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复