nextcloud / groupfolders

๐Ÿ“๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
279 stars 85 forks source link

Moving a versioned file into a groupfolder results in having versions on local system for the groupfolder path #2343

Open AndyXheli opened 1 year ago

AndyXheli commented 1 year ago

How to use GitHub

Steps to reproduce

  1. Upgrade to NC 26.0.1 from NC 25.0.6
  2. See https://github.com/nextcloud/server/issues/34085#issuecomment-1277736657

So, this bug seems specific to groupfolders in the end, which have their own backend for both trash and versions.

From what I understand, the bug is related to:

A file is created outside groupfolders

  1. The file is modified and versions are stored
  2. The file is moved into a groupfolder (most likely a whole folder is moved into a groupfolder, containing versioned files)
  3. The file is deleted from groupfolder (most likely its parent folder)
  4. Somehow this results in the event trying to delete versions on a folder rather than a file

What I could reproduce already is that moving a versioned file into a groupfolder results in having versions with local system for the groupfolder path, which does not happen for files created directly in the groupfolder.

Actual behaviour

This might be similar too https://github.com/nextcloud/server/issues/34085 & it was fixed in https://github.com/nextcloud/server/pull/34528

Server configuration

Operating system: Ubuntu 22.0.4

Web server: Apache2

Database: MariaDB

PHP version: 8.1

Nextcloud version: (see Nextcloud admin page) 26.0.1

Group folders version: 14.0.1

Updated from an older Nextcloud/ownCloud or fresh install: NC 25.0.6

Where did you install Nextcloud from:

Are you using external storage, if yes which one: local/s3/smb/sftp/... No

Are you using encryption: yes/no No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/... LDAP

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"MrIJw0AChp1Cvu2tK0h5","level":3,"time":"2023-04-20T14:19:57+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined array key 176125 at /var/www/nextcloud/apps/files_versions/lib/Storage.php#615","userAgent":"--","version":"26.0.1.1","data":{"app":"PHP"},"id":"644159c140205"} ```
AndyXheli commented 1 year ago

Quick question would this also be solved via https://github.com/nextcloud/server/pull/38224 ?

solracsf commented 1 year ago

It won't be solved, because the problem of moving files (versions) between backends remains, but you won't get the error.

joshtrichards commented 2 weeks ago

I believe this should have gotten better after #2910.