Files: stale "Locked by online editing in Text" icon after closing Text editor (NC 34.0.5)

未关闭
#66,479 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, php
领域
backend, frontend

调研方向

Start by tracing how the Files list receives and updates lock state when the Text editor closes; the report names the Text and Files apps but no source files or tests. Reproduce the stale icon using the listed steps, then identify which update is missing. Done when the icon clears after closing Text without navigating away or reloading.

由索引模型根据 Issue 内容生成。

描述

0. Needs triage bug feature: files feature: locking

⚠️ This issue respects the following points: ⚠️

  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug. The behavior reproduces both through the nginx reverse proxy and when accessing Apache directly.
  • This issue is not already reported on GitHub OR solved at the Community Help Forum.
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. The installed version is 34.0.5; this was confirmed as the latest 34.x patch level in the project checks on 2026-11-08.
  • 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

After editing a Markdown (.md) file in Nextcloud Text and closing the editor with the X in the upper-right corner, the Nextcloud Files list continues to display the padlock icon with the tooltip "Locked by online editing in Text" (German UI: "Gesperrt durch Online-Bearbeitung in Text").

The icon remains visible for more than 15 seconds after closing the editor. Nevertheless, the file can be reopened and edited, and it can be renamed successfully. The new filename is reflected immediately in the Files list while the lock icon remains visible.

While the icon is still displayed, the Files Lock app's CLI command reports that the affected file is not locked. Navigating to another Nextcloud app and back to Files, or reloading the browser page with F5, removes the icon.

The behavior has been reproduced with a Markdown and txt file opened in Nextcloud Text. The observations indicate that the lock indicator shown in the Files list can become stale; the underlying cause has not been established.

The issue was first noticed after upgrading to Nextcloud 34.

Steps to reproduce

  1. Open a folder in the Nextcloud Files web interface.
  2. Create or open a Markdown (.md) file in Nextcloud Text.
  3. Edit the file and wait for the changes to be saved.
  4. Close the Text editor using the X in the editor's upper-right corner, not the browser tab.
  5. Observe the file's lock icon in the Files list and wait at least 15 seconds.
  6. Without reloading the page, reopen the file or rename it. The operation succeeds, but the lock icon remains visible. After renaming, the new filename is displayed immediately.
  7. Navigate to another Nextcloud app and back to Files, or reload the browser page with F5. The icon disappears.

Expected behavior

After the Text editing session ends and its editing lock is released, the Files list should automatically remove the editing-lock icon without requiring navigation to another app or a full page reload.

Nextcloud Server version

34.0.5 (34.0.5.1 as reported by occ status).

Operating system

Debian/Ubuntu — Debian 12 (server).

PHP engine version

PHP 8.2.35

Web server

apache2 2.4.68-1~deb12u1 amd64

Database engine version

mariadb-server 1:10.11.19-0+deb12u1 amd64

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

The issue was first noticed after upgrading to Nextcloud 34 (major-version upgrade).

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled (occ encryption:status reports enabled: false).

What user-backends are you using?

Default user-backend (mariadb)

Configuration report

List of activated Apps

  - activity: 7.0.0
  - admin_audit: 1.24.0
  - app_api: 34.0.0
  - appstore: 1.0.0
  - bookmarks: 16.2.7
  - bruteforcesettings: 7.0.0
  - calendar: 6.6.5
  - circles: 34.0.0
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.9.5
  - contactsinteraction: 1.15.0
  - dashboard: 7.14.0
  - dav: 1.40.0
  - deck: 1.18.6
  - federatedfilesharing: 1.24.0
  - federation: 1.24.0
  - files: 2.6.0
  - files_automatedtagging: 5.0.1
  - files_downloadlimit: 5.2.0
  - files_lock: 34.0.1
  - files_pdfviewer: 7.0.0
  - files_reminders: 1.7.0
  - files_retention: 5.0.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - files_versions: 1.27.0
  - firstrunwizard: 7.0.0-dev.0
  - groupfolders: 22.0.6
  - guests: 4.10.1
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - mail: 5.13.1
  - nextcloud_announcements: 6.0.0
  - notes: 6.1.0
  - notifications: 7.0.0-dev.1
  - notify_push: 1.4.2
  - oauth2: 1.22.0
  - office: 1.0.0
  - password_policy: 6.0.0-dev.0
  - photos: 7.0.0
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - recommendations: 7.0.0
  - related_resources: 5.0.0-dev.0
  - richdocuments: 11.1.2
  - richdocumentscode: 26.4.502
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - sharebymail: 1.24.0
  - spreed: 24.0.7
  - support: 6.0.0
  - systemtags: 1.24.0
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - updatenotification: 1.24.0
  - user_status: 1.14.0
  - viewer: 7.0.0-dev.0
  - weather_status: 1.14.0
  - webhook_listeners: 1.6.0
  - workflowengine: 2.16.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No log entry directly related to the stale lock indicator has been confirmed.

Additional info

Files Lock CLI status

While the browser still showed the lock icon for file ID 381941:

$ sudo -u www-data php occ files:lock --status 381941
File #381941 is not locked

This checks the Files Lock app's lock state. It does not establish the status of every low-level transactional/Redis lock.

Browser and networking observations
  • Browser: Chromium on Ubuntu 24.04.
  • No failed HTTP requests were observed in the browser's Network panel when closing Text; the save and close requests returned HTTP 200.
  • The lock icon remains visible for more than 15 seconds after closing the editor.
  • The file can be reopened/edited and renamed while the icon remains visible.
  • Renaming updates the visible filename immediately; the lock icon remains.
  • Switching to another Nextcloud app and back to Files clears the icon.
  • Pressing F5 also clears the icon.
Scope and related observations
  • So far, the stale icon has been reproduced with a Markdown and txt file opened in Nextcloud Text.
  • The separate behavior where files synchronized from the desktop client do not appear in an already-open browser Files list until refresh is not the subject of this report; see nextcloud/server#2742.
Impact

The Files interface misleadingly indicates that a file is still locked even though the Files Lock app reports no lock and the file can be reopened, edited, and renamed normally. This can confuse users about the actual availability and state of the file.

主要语言
PHP
星标
37.5k
派生
5.4k
平均合并
1 天 13 小时
30 天内合并 PR
639

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/server 的其他 Issue

查看 nextcloud/server 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。