Empty trash doesn't work – #2
-
Since the original discussion topic is closed/locked, I have opened this new one so we can communicate further:
I understand that I am not the only user who has this problem. I will try to help you as much as I can, but I am not a programmer and I will need your guidance, if you don’t mind.
Immediately after I attempt to empty trash, My PHP log shows the following:
[12-Jun-2014 19:56:44 UTC] PHP Warning: rename(/services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/uploads/./miner-228x56.jpg,/services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/uploads/wpmc-trash/./miner-228x56.jpg) [<a href='function.rename'>function.rename</a>]: No such file or directory in /services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/plugins/wp-media-cleaner/wp-media-cleaner.php on line 254
[12-Jun-2014 19:56:44 UTC] PHP Notice: Undefined variable: trashPath in /services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/plugins/wp-media-cleaner/wp-media-cleaner.php on line 304
wp-media-cleaner.php, line 254:
if ( is_dir( $originalPath ) || !rename( $originalPath, $trashPath ) ) {
wp-media-cleaner.php, line 304:
wpmc_clean_dir( $trashPath );
Based on my very limited knowledge, it looks like your script in line 254 is trying to rename the file in
uploads/./miner-228x56.jpg
folder intowpmc-trash/./miner-228x56.jpg
, but by this time the fileminer-228x56.jpg
is no longer in uploads folder, it is already inwpmc-trash
folder. So why are you trying to move/rename a non-existing file instead of deleting it fromwpmc-trash
folder?:rename( /services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/uploads/./miner-228x56.jpg, /services/webpages/n/a/nautilus-intl.com/public/wordpress/wp-content/uploads/wpmc-trash/./miner-228x56.jpg )
As for the second error, it seems like trashPath variable is defined in this line:
$trashPath = trailingslashit( wpmc_trashdir() ) . $issue->path;
But the log states that
trashPath
is still undefined. Is the syntax correct?
- The topic ‘Empty trash doesn't work – #2’ is closed to new replies.