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:
<code>wpmc_clean_dir( $trashPath );</code>
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 into wpmc-trash/./miner-228x56.jpg
, but by this time the file miner-228×56.jpg is no longer in uploads
folder, it is already in wpmc-trash
folder. So why are you trying to move/rename a non-existing file instead of deleting it?:
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;
It looks like $trashPath is still undefined. Is the syntax correct?