Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot restore deleted files - nextcloud 21, group folders 9 #1349

Closed
magnetic5355 opened this issue Mar 5, 2021 · 12 comments · Fixed by #1375
Closed

Cannot restore deleted files - nextcloud 21, group folders 9 #1349

magnetic5355 opened this issue Mar 5, 2021 · 12 comments · Fixed by #1375
Labels
1. to develop Issues that are ready for development bug feature: trashbin Items related to the trashbin feature high high priority integration Nc21

Comments

@magnetic5355
Copy link

[webdav] Fatal: Error: Call to undefined method OCA\GroupFolders\Trash\TrashBackend::userHasACLAccessToPath() at <>

  1. /var/www/html/apps/files_trashbin/lib/Trash/TrashManager.php line 65
    OCA\GroupFolders\Trash\TrashBackend->restoreItem(OCA\GroupFolders\Trash\GroupTrashItem {})
  2. /var/www/html/apps/files_trashbin/lib/Sabre/AbstractTrash.php line 94
    OCA\Files_Trashbin\Trash\TrashManager->restoreItem(OCA\GroupFolders\Trash\GroupTrashItem {})
  3. /var/www/html/apps/files_trashbin/lib/Sabre/RestoreFolder.php line 76
@XueSheng-GIT
Copy link
Contributor

I'm facing the same issue. Files of group folders cannot be restored (neither by the user who deleted the file, nor the admin of a group folder can restore deleted files). Any workaround?

@pierreozoux
Copy link
Member

Do you use s3? It looks related to #1218

@XueSheng-GIT
Copy link
Contributor

I'm not using any external storage, just local storage.

@magnetic5355
Copy link
Author

local storage

@pierreozoux pierreozoux added high high priority Nc21 1. to develop Issues that are ready for development labels Mar 10, 2021
@fschrempf
Copy link
Contributor

@icewind1991 Looks like this has been introduced by 8fcff71. Can you come up with a fix, please?

@pierreozoux pierreozoux added the feature: trashbin Items related to the trashbin feature label Mar 14, 2021
icewind1991 added a commit that referenced this issue Mar 15, 2021
icewind1991 added a commit that referenced this issue Mar 15, 2021
@magnetic5355
Copy link
Author

I applied commit 06966fd and this is the new error when doing a multiple file restore

[PHP] Error: Error: Undefined offset: 2 at /var/www/html/custom_apps/groupfolders/lib/Trash/TrashBackend.php#312 at <>

  1. /var/www/html/custom_apps/groupfolders/lib/Trash/TrashBackend.php line 312
    OC\Log\ErrorHandler::onError(8, "Undefined offset: 2", "/var/www/html/c ... p", 312, {0: "And 3 more ... "})
  2. /var/www/html/apps/files_trashbin/lib/Trash/TrashManager.php line 113
    OCA\GroupFolders\Trash\TrashBackend->getTrashNodeById(OC\User\User {}, 1811881)
  3. /var/www/html/apps/files_trashbin/lib/Controller/PreviewController.php line 101
    OCA\Files_Trashbin\Trash\TrashManager->getTrashNodeById(OC\User\User {}, 1811881)
  4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 218
    OCA\Files_Trashbin\Controller\PreviewController->getPreview(1811881, 128, 128)
  5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 127
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Trashb ... {}, "getPreview")
  6. /var/www/html/lib/private/AppFramework/App.php line 157
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Trashb ... {}, "getPreview")
  7. /var/www/html/lib/private/Route/Router.php line 302
    OC\AppFramework\App::main("OCA\Files_Tras ... r", "getPreview", OC\AppFramework\ ... {}, {route: "files ... "})
  8. /var/www/html/lib/base.php line 993
    OC\Route\Router->match("/apps/files_trashbin/preview")
  9. /var/www/html/index.php line 37
    OC::handleRequest()

@icewind1991
Copy link
Member

@caesarcxiv

can you provide the output of the following sql query

SELECT path FROM oc_filecache where fileid = 1811881;

@magnetic5355
Copy link
Author

@caesarcxiv

can you provide the output of the following sql query

SELECT path FROM oc_filecache where fileid = 1811881;

Output:
'__groupfolders/55/Partner/Hidden/NotReal/SK/Edits/SR62352.jpg'

@icewind1991
Copy link
Member

#1381 should fix this I think

@magnetic5355
Copy link
Author

#1381 did resolve the offset error - here is a new error when restoring in bulk

Fatal webdav OCP\Files\NotFoundException: /var/www/html/apps/files_trashbin/lib/Trash/TrashManager.php - line 65:OCA\GroupFolders\Trash\TrashBackend->restoreItem(OCA\GroupFol ... {})/var/www/html/apps/files_trashbin/lib/Sabre/AbstractTrash.php - line 94:OCA\Files_Trashbin\Trash\TrashManager->restoreItem(OCA\GroupFol ... {})/var/www/html/apps/files_trashbin/lib/Sabre/RestoreFolder.php - line 76:OCA\Files_Trashbin\Sabre\AbstractTrash->restore()/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php - line 160:OCA\Files_Trashbin\Sabre\RestoreFolder->moveInto("1eb238d6349 ... 8", "trashbin/tr ... 8", OCA\Files_Tr ... {})/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 612:Sabre\DAV\Tree->move("trashbin/tr ... 8", "trashbin/tr ... 8")/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:Sabre\DAV\Server->emit("method:MOVE", [ Sabre\HTTP ... }])/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:Sabre\DAV\Server->start()/var/www/html/apps/dav/lib/Server.php - line 332:Sabre\DAV\Server->exec()/var/www/html/apps/dav/appinfo/v2/remote.php - line 35:OCA\DAV\Server->exec()/var/www/html/remote.php - line 167:require_once("/var/www/ht ... p")

backportbot-nextcloud bot pushed a commit that referenced this issue Mar 29, 2021
backportbot-nextcloud bot pushed a commit that referenced this issue Mar 29, 2021
backportbot-nextcloud bot pushed a commit that referenced this issue Mar 29, 2021
pierreozoux pushed a commit to pierreozoux/groupfolders that referenced this issue Apr 14, 2021
jngrb pushed a commit to jngrb/groupfolders that referenced this issue Apr 15, 2021
@fschrempf
Copy link
Contributor

fschrempf commented Apr 23, 2021

This fix hasn't been released, so seeing this issue closed might confuse people. Let's reopen until this has landed.

@fschrempf fschrempf reopened this Apr 23, 2021
@juliusknorr
Copy link
Member

Released with 9.0.1/8.2.1/7.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug feature: trashbin Items related to the trashbin feature high high priority integration Nc21
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants