Skip to content

TypeError in TrashBackend::setupTrashFolder() when uploading files to a group folder (v21.0.13) #5014

Description

@TheModsCloudAdmin

Steps to reproduce
Navigate to any group folder (e.g. Committee, Minutes, Members) via the web browser
Upload any file (tested with .docx, image, and text files, sizes from 32KB upward)
Upload progress reaches 100%, but the file never appears in the folder
Expected behaviour

The uploaded file should appear in the group folder as normal.

Actual behaviour

The upload appears to complete in the browser (progress bar reaches 100%) but the file never lands in the folder. This happens with every file type tested and every group folder tested, for both a regular user and the admin account. Uploads to personal (non-group) storage work fine.

Server configuration

Operating system: Linux Mint
Web server: Apache 2.4.58
Database: MariaDB
PHP version: 8.3.6
Nextcloud version: 33.0.7.1
Team folders version: 21.0.13
Updated from an older Nextcloud/ownCloud or fresh install: Updated from Nextcloud 33.0.0
Where did you install Nextcloud from: Official Nextcloud download/updater
Are you using external storage, if yes which one: No, local storage only
Are you using encryption: No
Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Chrome / Edge (tested in both)
Operating system: Windows 10/11

Logs
Nextcloud log (data/nextcloud.log)
TypeError: OCA\GroupFolders\Trash\TrashBackend::setupTrashFolder(): Argument #1 ($folder) must be of type OCA\GroupFolders\Folder\FolderDefinitionWithPermissions, OCA\GroupFolders\Folder\FolderWithMappingsAndCache given, called in /var/www/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php on line 727

Trace:
#0 TrashBackend.php(727): TrashBackend->setupTrashFolder()
#1 TrashBackend.php(714): TrashBackend->moveTrashItems()
#2 NodeRenamedListener.php(73): TrashBackend->updateTrashedChildren()
#3 ServiceEventListener.php(57): NodeRenamedListener->handle()
#4-8 (Symfony event dispatcher chain)
#9 Directory.php(451): OC\Files\View->rename()
#12 CorePlugin.php(612): Sabre\DAV\Tree->move()
#17 remote.php(151): OCA\DAV\Server->exec()

Additional notes: The upload finalizes as a WebDAV MOVE request (completing a chunked upload), which fires a NodeRenamedListener event. This calls TrashBackend::updateTrashedChildren(), which passes a FolderWithMappingsAndCache object into setupTrashFolder(), but that method expects a FolderDefinitionWithPermissions object — a type mismatch that looks like it was introduced in this release. I tried downgrading to 21.0.12 (which appears unaffected), but Nextcloud's DB migration tracking doesn't support a clean app downgrade, so I'm currently stuck on 21.0.13 with this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions