1.create at least 2 files
2.delete these files
3.go in trashbin
4.click select all button to select these deleted files
5.unclick (unselect) one of these files at least (but not all!)
6.click Delete to definitely delete all the selected files
All the selected files should be deleted.
None of the files are deleted.
Database:10.0.31-MariaDB-0ubuntu0.16.04.2 Ubuntu 16.04
PHP version:PHP 7.0.22
*ownCloud version:10.0.6.1
*Where did you install ownCloud from:owncloud-10.0.6.tar.bz2
@PVince81 I think it's a big bug,very seriously.Expected to fixed,thanks.
Similarly:
1) Have files in the trashbin
2) Use the top checkbox to "select all"
3) Uncheck some individual file(s)
4) Click "Restore" to try and restore all the files that are still selected.
Error dialog pops up with Couldn't restore
The delete behavior works correctly on the main files page (which has quite different js). You can "select all" then unselect some files, then delete all the remaining selected files.
@phil-davis But in trashbin, I "select all" then unselect some files,the restore and delete button is disabled.It's pretty annoying to delete a lot of files from the recycle bin if there are some I don't want to delete.
@supermanlinux I agree - if you have a trashbin folder of 100 files, and want to delete 99 of them, you have to select each of the 99 individually.
Or you do the ugly workaround - restore the 1 file, then delete all remaining 99 from trashbin, then delete the 1 file again from the main files page. Now you have a trashbin with just that 1 file in it :)
@phil-davis This has seriously affected the user experience. Users generally do not do this. Is it difficult to fix this problem?
@PVince81 I have the same problems. Any chance this will get fixed? It's pretty annoying to delete a lot of files from the recycle bin if there are some I don't want to delete.Thanks.
@sharidas @PVince81 Thanks for fixed deletion of selected files in trashbin.Expected to fix click "Restore" to try and restore all the files that are still selected. Error dialog pops up with Couldn't restore.Thanks very much.
To fix and test:
PR #30999 has been merged and has tests for existing behavior of the file select checkboxes with delete from trashbin and restore from trashbin, as well as multi-select delete from the ordinary files page. Those are existing things that work and are useful to smoke test at the webUI acceptance test level.
I will make more tests that demonstrate the misbehavior reported in this issue, and they will pass when the behavior is fixed.
owncloud.log
{"reqId":"CVfJXatQ9Mg9lNDOJVce","level":3,"time":"2018-06-04T11:34:32+00:00","remoteAddr":"172.18.0.8","user":"admin","app":"no app in context","method":"POST","url":"\/index.php\/apps\/files_trashbin\/ajax\/delete.php","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\\\/admin\\\/files\\\/files_trashbin\\\/files\\\/.dla-2.txt\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(129): OC\\\\Files\\\\Node\\\\Root->get('\\\/admin\\\/files\\\/fi...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Preview.php(1252): OC\\\\Files\\\\Node\\\\Folder->get('\\\/files_trashbin...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/hook.php(105): OC\\\\Preview::prepare_delete(Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_trashbin\\\/lib\\\/Trashbin.php(627): OC_Hook::emit('\\\\\\\\OCP\\\\\\\\Trashbin', 'preDelete', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_trashbin\\\/lib\\\/Trashbin.php(666): OCA\\\\Files_Trashbin\\\\Trashbin::emitTrashbinPreDelete('\\\/files_trashbin...')\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_trashbin\\\/ajax\\\/delete.php(66): OCA\\\\Files_Trashbin\\\\Trashbin::delete('', 'admin', 'la-2.txt')\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 [internal function]: OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(NULL)\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(Closure), Array)\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(912): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_tra...')\\n#10 \\\/var\\\/www\\\/owncloud\\\/index.php(55): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Root.php\",\"Line\":192}"}
Merged the changes to
Hence closing this issue.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
PR #30999 has been merged and has tests for existing behavior of the file select checkboxes with delete from trashbin and restore from trashbin, as well as multi-select delete from the ordinary files page. Those are existing things that work and are useful to smoke test at the webUI acceptance test level.
I will make more tests that demonstrate the misbehavior reported in this issue, and they will pass when the behavior is fixed.