• Resolved Elbe06

    (@elbe06)


    Hi,

    I’m running media cleaner on a multisite configuration.

    On one of the sites everuything went very well (except the issue with sliders, booklets… mentionned in a previous post) but on the 2 other sites my netwokk, I can scan, mark for deletion unused media but cannot empty the trash or perform single media deletion….

    I have not been able to reproduce this on a single-site implementation

    Thanks for help

    Louis

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi Louis,

    Did you check your PHP error logs?

    Thread Starter Elbe06

    (@elbe06)

    Hi Jordy,

    Forgot to mention I’m currently testing on ServerPress Desktop Server.

    Here are the last lines (from today) of my PHP Error log…

    [09-Feb-2017 14:20:30 UTC] PHP 6. wpmc_wp_ajax_wpmc_delete_do() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:20:30 UTC] PHP 7. wpmc_delete() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:57

    [09-Feb-2017 14:20:30 UTC] PHP 8. wpmc_recover() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:470

    [09-Feb-2017 14:20:30 UTC] PHP 9. wpmc_recover_file() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:323

    [09-Feb-2017 14:20:30 UTC] PHP 10. rename() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:296

    [09-Feb-2017 14:21:57 UTC] PHP Warning: rename(D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/wpmc-trash/2015/04/arcenciel.jpg,D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/2015/04/arcenciel.jpg): in D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php on line 296

    [09-Feb-2017 14:21:57 UTC] PHP Stack trace:

    [09-Feb-2017 14:21:57 UTC] PHP 1. {main}() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:0

    [09-Feb-2017 14:21:57 UTC] PHP 2. do_action() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:91

    [09-Feb-2017 14:21:57 UTC] PHP 3. WP_Hook->do_action() D:\DesktopServer\www.lapararecom.dev\wp-includes\plugin.php:453

    [09-Feb-2017 14:21:57 UTC] PHP 4. WP_Hook->apply_filters() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:323

    [09-Feb-2017 14:21:57 UTC] PHP 5. call_user_func_array:{D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298}() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:21:57 UTC] PHP 6. wpmc_wp_ajax_wpmc_delete_do() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:21:57 UTC] PHP 7. wpmc_delete() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:57

    [09-Feb-2017 14:21:57 UTC] PHP 8. wpmc_recover() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:470

    [09-Feb-2017 14:21:57 UTC] PHP 9. wpmc_recover_file() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:323

    [09-Feb-2017 14:21:57 UTC] PHP 10. rename() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:296

    [09-Feb-2017 14:23:14 UTC] PHP Warning: rename(D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/wpmc-trash/2015/04/house-in-snow.jpg,D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/2015/04/house-in-snow.jpg): in D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php on line 296

    [09-Feb-2017 14:23:14 UTC] PHP Stack trace:

    [09-Feb-2017 14:23:14 UTC] PHP 1. {main}() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:0

    [09-Feb-2017 14:23:14 UTC] PHP 2. do_action() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:91

    [09-Feb-2017 14:23:14 UTC] PHP 3. WP_Hook->do_action() D:\DesktopServer\www.lapararecom.dev\wp-includes\plugin.php:453

    [09-Feb-2017 14:23:14 UTC] PHP 4. WP_Hook->apply_filters() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:323

    [09-Feb-2017 14:23:14 UTC] PHP 5. call_user_func_array:{D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298}() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:23:14 UTC] PHP 6. wpmc_wp_ajax_wpmc_delete_do() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:23:14 UTC] PHP 7. wpmc_delete() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:57

    [09-Feb-2017 14:23:14 UTC] PHP 8. wpmc_recover() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:470

    [09-Feb-2017 14:23:14 UTC] PHP 9. wpmc_recover_file() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:323

    [09-Feb-2017 14:23:14 UTC] PHP 10. rename() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:296

    [09-Feb-2017 14:25:10 UTC] PHP Warning: rename(D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/wpmc-trash/2015/04/house-in-snow.jpg,D:\DesktopServer\www.lapararecom.dev/wp-content/uploads/sites/4/2015/04/house-in-snow.jpg): in D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php on line 296

    [09-Feb-2017 14:25:10 UTC] PHP Stack trace:

    [09-Feb-2017 14:25:10 UTC] PHP 1. {main}() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:0

    [09-Feb-2017 14:25:10 UTC] PHP 2. do_action() D:\DesktopServer\www.lapararecom.dev\wp-admin\admin-ajax.php:91

    [09-Feb-2017 14:25:10 UTC] PHP 3. WP_Hook->do_action() D:\DesktopServer\www.lapararecom.dev\wp-includes\plugin.php:453

    [09-Feb-2017 14:25:10 UTC] PHP 4. WP_Hook->apply_filters() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:323

    [09-Feb-2017 14:25:10 UTC] PHP 5. call_user_func_array:{D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298}() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:25:10 UTC] PHP 6. wpmc_wp_ajax_wpmc_delete_do() D:\DesktopServer\www.lapararecom.dev\wp-includes\class-wp-hook.php:298

    [09-Feb-2017 14:25:10 UTC] PHP 7. wpmc_delete() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:57

    [09-Feb-2017 14:25:10 UTC] PHP 8. wpmc_recover() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:470

    [09-Feb-2017 14:25:10 UTC] PHP 9. wpmc_recover_file() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:323

    [09-Feb-2017 14:25:10 UTC] PHP 10. rename() D:\DesktopServer\www.lapararecom.dev\wp-content\plugins\media-cleaner\media-cleaner.php:296

    Thanks

    Louis

    Thread Starter Elbe06

    (@elbe06)

    In fact I can manually delete some media but I cannot delete some of them and the ones I cannot delete seem to “lock” the emty trash function

    Thanks

    Louis

    Thread Starter Elbe06

    (@elbe06)

    I just tried the exact same site on Wamp server on Windows rather than ServerPress Desktop Server: same result

    Thread Starter Elbe06

    (@elbe06)

    MAybe this will help :

    I marked media that I cannot delete as “Ignore” (19 files so far…). The count number is 19 for Ignore and … 19 for Trash but when I look at the trash it’s EMPTY!!!!!

    Thanks

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi Louis,

    That’s strange, the rename function crashes but the code continued to execute. However in my code I have a call to die() if that happens. That’s really weird it continues to execute (and actually fails in many parts of the code because of that).

    I don’t think it’s linked to the multisite; I test it and use it on this kind of install.

    What is the version of PHP you are using on this server?

    Can you also clear this log, simply delete a file (not from the trash, just another one, move it to the trash), and have a look at the log? The error might be at that step. Maybe the file is not even part of the trash yet, but it’s marked as part of it.

    Thread Starter Elbe06

    (@elbe06)

    Hi sorry for the late reply.

    I reinstalled a local server using Wamp rathern than Desktop Server with PHP 7 and restored a copy of my site BEFORE performing any media cleanup.

    On 2 of the subsites every thing worked well. On the primary site, I’m still stuck with trash. It show 13 elements but there is nothing to display. If I try toi recover or empty the trash it goes into kind of a loop and nerver ends.

    Here are the laste lines of the PHP log file:

    [13-Feb-2017 17:50:42 UTC] PHP Warning: rename(E:\www\lapararecom/wp-content/uploads/wpmc-trash/,E:\www\lapararecom/wp-content/uploads/): Acc?s refus?. (code: 5) in E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php on line 302

    [13-Feb-2017 17:50:42 UTC] PHP Stack trace:

    [13-Feb-2017 17:50:42 UTC] PHP 1. {main}() E:\www\lapararecom\wp-admin\admin-ajax.php:0

    [13-Feb-2017 17:50:42 UTC] PHP 2. do_action() E:\www\lapararecom\wp-admin\admin-ajax.php:91

    [13-Feb-2017 17:50:42 UTC] PHP 3. WP_Hook->do_action() E:\www\lapararecom\wp-includes\plugin.php:453

    [13-Feb-2017 17:50:42 UTC] PHP 4. WP_Hook->apply_filters() E:\www\lapararecom\wp-includes\class-wp-hook.php:323

    [13-Feb-2017 17:50:42 UTC] PHP 5. wpmc_wp_ajax_wpmc_recover_do() E:\www\lapararecom\wp-includes\class-wp-hook.php:298

    [13-Feb-2017 17:50:42 UTC] PHP 6. wpmc_recover() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:93

    [13-Feb-2017 17:50:42 UTC] PHP 7. wpmc_recover_file() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:329

    [13-Feb-2017 17:50:42 UTC] PHP 8. rename() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:302

    [13-Feb-2017 18:12:59 UTC] PHP Warning: rename(E:\www\lapararecom/wp-content/uploads/wpmc-trash/,E:\www\lapararecom/wp-content/uploads/): Acc?s refus?. (code: 5) in E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php on line 302

    [13-Feb-2017 18:12:59 UTC] PHP Stack trace:

    [13-Feb-2017 18:12:59 UTC] PHP 1. {main}() E:\www\lapararecom\wp-admin\admin-ajax.php:0

    [13-Feb-2017 18:12:59 UTC] PHP 2. do_action() E:\www\lapararecom\wp-admin\admin-ajax.php:91

    [13-Feb-2017 18:12:59 UTC] PHP 3. WP_Hook->do_action() E:\www\lapararecom\wp-includes\plugin.php:453

    [13-Feb-2017 18:12:59 UTC] PHP 4. WP_Hook->apply_filters() E:\www\lapararecom\wp-includes\class-wp-hook.php:323

    [13-Feb-2017 18:12:59 UTC] PHP 5. wpmc_wp_ajax_wpmc_recover_do() E:\www\lapararecom\wp-includes\class-wp-hook.php:298

    [13-Feb-2017 18:12:59 UTC] PHP 6. wpmc_recover() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:93

    [13-Feb-2017 18:12:59 UTC] PHP 7. wpmc_recover_file() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:329

    [13-Feb-2017 18:12:59 UTC] PHP 8. rename() E:\www\lapararecom\wp-content\plugins\media-cleaner\media-cleaner.php:302

    Thanks for your help

    PS: the behaviour I mentionned in a previous post with Soliloquy and Booklet plugins is strange: it properly handles some media files – and does notmark them for deletion – but marks some for deletion and this in the same slider or booklet….

    Louis

    Plugin Author Jordy Meow

    (@tigroumeow)

    Mmm, I am not so sure. I tried on a clean install of a network site, tried on a few sub-sites and also on a main site and I didn’t encounter an issue at all.

    When I see your PHP Error Logs here, it looks like you are trying to empty the trash, but there are no errors before that, so it means the files were put in the trash successfully? Do you see those files in the trash folder in your /uploads directory?

    Also, would you mind testing on an install “online”, on a hosting service? It looks like you are trying on your localhost, which is fine, but if you filesystem has issues with access rights it might be a problem too, and it would be really hard to debug.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cannot empty trash on multisite’ is closed to new replies.