Skip to content

[Bug]: Drag and drop move broken - ReferenceError: fileTree is not defined in FileEntryMixin.ts #59468

@OrFrederick

Description

@OrFrederick

Bug description

Drag and drop to move files between folders in the Files app silently fails. The onDrop handler in FileEntryMixin.ts references an undefined variable fileTree in a logger.debug() call, which throws a ReferenceError and crashes the entire handler.

The other two onDrop implementations in DropService.ts and BreadCrumbs.vue correctly define fileTree before referencing it — this one was missed during a refactor.

Source: apps/files/src/components/FileEntryMixin.ts line 539

logger.debug('Dropped', { event, folder: this.source, selection, fileTree })

fileTree is never defined in this scope. Also present on master.

Fix

- logger.debug('Dropped', { event, folder: this.source, selection, fileTree })
+ logger.debug('Dropped', { event, folder: this.source, selection })

Steps to reproduce

  1. Open the Files app
  2. Drag any file onto a folder in the same directory listing
  3. Nothing happens — file stays in place

Expected behavior

The file should be moved into the target folder.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • Other (OIDC via user_oidc)

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "overwriteprotocol": "https",
        "upgrade.disable-web": true,
        "dbtype": "pgsql",
        "version": "33.0.2.2",
        "dbtableprefix": "oc_",
        "installed": true,
        "maintenance_window_start": 1,
        "maintenance": false,
        "default_phone_region": "DE"
    }
}

List of activated Apps

  - files: 2.5.0
  - files_external: 1.25.1
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - richdocuments: 10.1.2
  - user_oidc: 8.8.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No server-side errors — this is a client-side JavaScript error only:

ReferenceError: fileTree is not defined
    onDrop FileEntryMixin.ts:460

Additional info

Confirmed fix: removing fileTree from the logger.debug call in the compiled dist/files-main.js immediately restores drag-and-drop move functionality.

Bug is also present on master branch — same undefined reference in FileEntryMixin.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap33-feedbackbug

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions