You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: 500 Internal Server Error when assigning system tag to Group Folder: OCP\Files\NotFoundException in Activity Listener ShareHelper #65720
This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
When assigning a collaborative system tag to a file or folder inside a Group Folder, Nextcloud responds with an HTTP 500 Internal Server Error, and the UI displays the error toast "Failed to apply tags changes".
Despite the error, the tag mapping is successfully written to the database. If the user clicks "Apply" a second time (or refreshes the page), the tag is already present and the request completes successfully with HTTP 207 Multi-Status.
The root cause is in OCA\SystemTags\Activity\Listener: upon tag assignment, it calls OCA\Share20\ShareHelper::getPathsForAccessList() to resolve folder paths for all group members. If any user in the group has an uninitialized, stale, or unmounted path for that Group Folder (e.g. an inactive user), an unhandled OCP\Files\NotFoundException is thrown, aborting the WebDAV request with a 500 status.
Steps to reproduce
Configure a Group Folder (via groupfolders) accessible by a user group. Ensure at least one member of that group has not yet accessed or initialized their personal mount path for the folder.
Log into Nextcloud with an account that has write permissions on the Group Folder.
Open the details panel for any file or subfolder inside the Group Folder and go to the Tags section.
Select and assign a collaborative tag, then submit/apply.
Notice the HTTP 500 error and the UI toast: "Failed to apply tags changes".
Click "Apply" again or reload the page: the tag is applied and subsequent requests return HTTP 207.
Expected behavior
The system tag should be applied cleanly on the first attempt, returning HTTP 200/207 without throwing an HTTP 500 or showing an error toast, even if some users in the group access list do not have active or initialized folder mounts.
Nextcloud Server version
34
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
In apps/systemtags/lib/Activity/Listener.php, the listener resolves the file/folder paths for all accounts returned in the access list of the object. When a member of a Group Folder hasn't initialized their personal mount point or if an account has a stale mount path, ShareHelper::getPathsForAccessList() invokes getParent() on a non-existent node, throwing OCP\Files\NotFoundException.
Because this exception is unhandled within the activity listener, it terminates the entire WebDAV request with an HTTP 500 error, even though the tag mapping was already persisted in the database.
Wrapping the path resolution loop or the call to getPathsForAccessList() inside a try / catch (\OCP\Files\NotFoundException $e) block allows Nextcloud to skip the unresolvable user path and complete the tag assignment cleanly with HTTP 207/200.
Activity
mdmiko commentedon Oct 20, 2026
Proposed fix
In
apps/systemtags/lib/Activity/Listener.php, the listener resolves the file/folder paths for all accounts returned in the access list of the object. When a member of a Group Folder hasn't initialized their personal mount point or if an account has a stale mount path,ShareHelper::getPathsForAccessList()invokesgetParent()on a non-existent node, throwingOCP\Files\NotFoundException.Because this exception is unhandled within the activity listener, it terminates the entire WebDAV request with an HTTP 500 error, even though the tag mapping was already persisted in the database.
Wrapping the path resolution loop or the call to
getPathsForAccessList()inside atry / catch (\OCP\Files\NotFoundException $e)block allows Nextcloud to skip the unresolvable user path and complete the tag assignment cleanly with HTTP 207/200.Code diff