owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.34k stars 2.05k forks source link

Mass select and permanent delete not working #2366

Closed cyberdaemon closed 11 years ago

cyberdaemon commented 11 years ago

Expected behaviour

Files to be deleted when mass select them and then hit delete button

Actual behaviour

Files are not permanent deleted. Have to select each file and delete them separately

Steps to reproduce

  1. delete some files
  2. go to deleted files and mass select them
  3. hit delete

    Server configuration

Operating system: Centos 5.9

Web server: Apache 2.2.3

Database: MySQL 5

PHP version: 5.4

ownCloud version: 5.0

Client configuration

Browser: Chrome

Operating system: Win7

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

none

Browser log

none
BernhardPosselt commented 11 years ago

@schiesbn @icewind1991

schiessle commented 11 years ago

We had a problem with the database statements which caused a similar error for postgreSQL database. Most likely this will also affect MySQL databases. The patch is already in place and will be released with the next bug-fix release.

If you want you can apply this patch already in advance: https://github.com/owncloud/core/commit/1631aa24346552d546abbe00453acc9f2cb22ce6

Please let us know if this solves your issue.

DeepDiver1975 commented 11 years ago

Unit tests please!

cyberdaemon commented 11 years ago

I´m afraid the patch doesn´t work. Same behaviour

schiessle commented 11 years ago

Can you please enable the debug mode and check again your logs?

You have to add to your config/config.php:

define("DEBUG", true);
cyberdaemon commented 11 years ago

you mean: 'debug' => 'true', in the array?

If so, no logs are generated when mass deleting files.

schiessle commented 11 years ago

no,

define("DEBUG", true);

see the config example as reference: https://github.com/owncloud/core/blob/master/config/config.sample.php

cyberdaemon commented 11 years ago

OK, done. No error in log

schiessle commented 11 years ago

It's quite strange that you don't get any error messages.

Can you edit apps/files_trashbin/ajax/delete.php

and add after line 6: error_log("files: " . $files);

and after line 30: error_log("couldn't delete file: " . $filename);

and post the output from your apache error.log?

cyberdaemon commented 11 years ago

OK, changed following:

$files = $_POST['files']; error_log("files: " . $files); $dirlisting = $_POST['dirlisting']; . . . } else { error_log("could'nt delete file: " . $filename); $error[] = $filename;

Nothing in in the logs.

schiessle commented 11 years ago

just to be sure, we are talking about the apache error log, not about the owncloud log.

If this doesn't write anything to your apache error log than you probably have to check your apache config and check why he doesn't write anything to his log files.

cyberdaemon commented 11 years ago

Yes we are talkin about the apache log. The apache config is OK. I can log entries from that virtual host but none generated from the file delete

schiessle commented 11 years ago

Hm, one more try. I just discovered some left over debug output: https://github.com/owncloud/core/blob/stable5/apps/files_trashbin/js/trash.js#L120

If you have enabled the debug mode in your config.php like described above and open the java script console in your browser you should see a message "delete selected" once you click the delete button for the selected files. If this also doesn't trigger any message than I would suggest to try it with a different browser. Because this would mean that for some reasons the click doesn't get triggered at all.

BTW: Do you have any JS blocker installed?

cyberdaemon commented 11 years ago

Yes i saw "delete selected" in the console but no other infos or logs in Chrome. Same procedure different browser (firefox 19)

[13:51:00.128] delete selected [13:51:00.196] POST https://example.de/index.php/core/ajax/translations.php [HTTP/1.1 200 OK 140ms] [13:51:03.531] POST https://example.de/index.php/apps/files_trashbin/ajax/delete.php [13:51:03.532] GET https://example.de/core/img/loading.gif [0ms] [13:51:03.533] GET https://example.de/index.php/apps/files_trashbin [HTTP/1.1 200 OK 321ms] [13:51:03.868] GET https://example.de/index.php/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css [HTTP/1.1 200 OK 199ms] [13:51:03.869] GET https://example.de/index.php/apps/files_texteditor/css/DroidSansMono/stylesheet.css [HTTP/1.1 200 OK 222ms] [13:51:03.869] GET https://example.de/index.php/apps/files_texteditor/css/style.css [HTTP/1.1 200 OK 258ms] [13:51:03.870] GET https://example.de/index.php/apps/user_migrate/css/style.css [HTTP/1.1 200 OK 292ms] [13:51:03.768] Unbekannte Eigenschaft '-moz-box-shadow'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:22 [13:51:03.768] Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:27 [13:51:03.768] Farbe erwartet, aber 'top' gefunden. Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:31 [13:51:03.768] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:32 [13:51:03.768] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:46 [13:51:03.768] Unbekannte Eigenschaft 'box-sizing'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:54 [13:51:03.768] Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar'. Regelsatz wegen ungültigem Selektor ignoriert. @ https://example.de/core/css/styles.css:71 [13:51:03.768] Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar-track-piece'. Regelsatz wegen ungültigem Selektor ignoriert. @ https://example.de/core/css/styles.css:72 [13:51:03.769] Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar-thumb'. Regelsatz wegen ungültigem Selektor ignoriert. @ https://example.de/core/css/styles.css:73 [13:51:03.769] Unbekannte Eigenschaft 'list-style-indent'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:203 [13:51:03.770] Deklaration erwartet, aber '/' gefunden. Übersprungen bis zur nächsten Deklaration @ https://example.de/core/css/styles.css:256 [13:51:03.770] Unbekannte Eigenschaft '-moz-border-radius-bottomleft'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:290 [13:51:03.770] Unbekannte Eigenschaft '-moz-border-radius-bottomright'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:290 [13:51:03.770] Unbekannte Eigenschaft '-moz-border-radius-topleft'. Deklaration ignoriert. @ https://example.de/core/css/styles.css:307 [13:51:03.771] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/core/css/jquery-ui-1.10.0.custom.css:50 [13:51:03.773] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/core/css/jquery-tipsy.css:5 [13:51:03.777] Unbekannte Eigenschaft 'zoom'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:6 [13:51:03.777] Deklaration erwartet, aber '*' gefunden. Übersprungen bis zur nächsten Deklaration @ https://example.de/3rdparty/css/chosen/chosen.css:7 [13:51:03.777] Unbekannte Eigenschaft '-moz-box-shadow'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:17 [13:51:03.777] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:26 [13:51:03.777] Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:27 [13:51:03.777] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:33 [13:51:03.777] Unbekannte Eigenschaft '-moz-background-clip'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:35 [13:51:03.777] Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:103 [13:51:03.777] Farbe erwartet, aber 'top' gefunden. Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:206 [13:51:03.778] Unbekannte Eigenschaft '-moz-border-radius-bottomleft'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:335 [13:51:03.778] Unbekannte Eigenschaft '-moz-border-radius-bottomright'. Deklaration ignoriert. @ https://example.de/3rdparty/css/chosen/chosen.css:336 [13:51:03.970] GET https://example.de/index.php/apps/files_videoviewer/css/style.css [HTTP/1.1 200 OK 326ms] [13:51:03.787] Unbekannte Eigenschaft '-moz-box-shadow'. Deklaration ignoriert. @ https://example.de/3rdparty/miniColors/css/jquery.miniColors.css:11 [13:51:03.787] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/3rdparty/miniColors/css/jquery.miniColors.css:14 [13:51:03.787] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/3rdparty/miniColors/css/jquery.miniColors.css:113 [13:51:03.973] GET https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css [HTTP/1.1 200 OK 313ms] [13:51:03.974] GET https://example.de/index.php/apps/files/css/files.css [HTTP/1.1 200 OK 166ms] [13:51:03.974] GET https://example.de/index.php/core/js/config.js [HTTP/1.1 200 OK 213ms] [13:51:04.014] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css:328 [13:51:04.015] Unbekannte Eigenschaft 'zoom'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css:333 [13:51:04.015] Fehler beim Verarbeiten des Wertes für 'height'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css:339 [13:51:04.015] Fehler beim Verarbeiten des Wertes für 'top'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_imageviewer/css/jquery.fancybox-1.3.4.css:344 [13:51:04.197] Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:96 [13:51:04.197] Fehler beim Verarbeiten des Wertes für 'padding'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:183 [13:51:04.197] Unbekannte Eigenschaft 'box-sizing'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:184 [13:51:04.197] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:227 [13:51:04.197] Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:244 [13:51:04.197] Unbekannte Eigenschaft '-moz-background-size'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:251 [13:51:04.198] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_videoviewer/css/mediaelementplayer.css:606 [13:51:04.226] Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. @ https://example.de/index.php/apps/files/css/files.css:44 [13:51:04.226] Unbekannte Eigenschaft 'box-sizing'. Deklaration ignoriert. @ https://example.de/index.php/apps/files/css/files.css:78 [13:51:04.513] Unbekannte Eigenschaft 'box-sizing'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_trashbin:16 [13:51:04.513] Unbekannte Eigenschaft 'appearance'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_trashbin:100 [13:51:04.513] Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_trashbin:206 [13:51:04.513] Unbekannte Eigenschaft '-moz-box-shadow'. Deklaration ignoriert. @ https://example.de/index.php/apps/files_trashbin:262 [13:51:04.634] Das Components-Objekt sollte nicht mehr verwendet werden. Es wird bald entfernt. @ resource://onepassword-at-agilebits-dot-com/api-utils/lib/loader.js -> resource://onepassword-at-agilebits-dot-com/api-utils/lib/sandbox.js -> resource://onepassword-at-agilebits-dot-com/api-utils/lib/content/content-proxy.js:13 [13:51:04.963] GET https://example.de/index.php/core/routes.json [HTTP/1.1 200 OK 217ms] [13:51:04.965] POST https://example.de/index.php/core/ajax/translations.php [HTTP/1.1 200 OK 247ms] [13:51:04.985] GET https://example.de/cron.php [HTTP/1.1 200 OK 303ms]

schiessle commented 11 years ago

You can see in your output that the delete.php gets called, so I don't understand why the error_log output doesn't appear in your apache error log.

Does the error_log() output appear in your apache log if you delete a single file?

cyberdaemon commented 11 years ago

yes, this is the input:

[Mon Mar 18 14:57:43 2013] [error] [client xxx.xxx.xxx.xxx files: ["_cleanup.gss.d1363384704"], referer: https://example.de/index.php/apps/files_trashbin

cyberdaemon commented 11 years ago

Do you need more testing? I´ll be glad to help.

schiessle commented 11 years ago

At the moment I'm not sure what you could test. The js console tells us the the ajax call gets executed without an error but for some reasons the function never gets called.

One try would be to add at the top of apps/files_trashbin/ajax/delete.php a line like: error_log("delete.php called");

and see if this output appears in your error log, to make sure that not some of the early checks like (isLoggedIn()) fail.

Just some guesses but it is really hard to find the problem as long as your system doesn't produce any error messages.

If this also doesn't work maybe you should try a fresh onwCloud installation.

cyberdaemon commented 11 years ago

I have added following line at the bottom:

$files = $_POST['files']; error_log("files: " . $files);
error_log("delete.php called");

After trying to delete the files there are no log entries.I have tried different browser; its all the same.

cyberdaemon commented 11 years ago

I can confirm that this works now in 5.0.3

cyberdaemon commented 11 years ago

I´m sorry to inform you but this still doesn´t work in the latest OC. I don´t know why it worked for short time but now the same issue appears. Can anyone confirm this?

cyberdaemon commented 11 years ago

Issue still persists in 5.0.4