• Resolved nohler

    (@nohler)


    I went to Media > Library
    I selected an image – it opened the ‘Edit Media’ screen
    I scrolled down to ‘Replace media’ and click on ‘upload new file’
    I chose a replacement jpeg and selected ‘just replace file’
    clicked ‘upload’

    got these errors:

    Warning: unlink(/home/sidtfocu/public_html/wp-content/uploads/2012/12/newheader-148×19.jpg) [function.unlink]: No such file or directory in /home/sidtfocu/public_html/wp-content/plugins/enable-media-replace/upload.php on line 60

    Warning: unlink(/home/sidtfocu/public_html/wp-content/uploads/2012/12/newheader-148×19.jpg) [function.unlink]: No such file or directory in /home/sidtfocu/public_html/wp-content/plugins/enable-media-replace/upload.php on line 60

    Warning: unlink(/home/sidtfocu/public_html/wp-content/uploads/2012/12/newheader-150×130.jpg) [function.unlink]: No such file or directory in /home/sidtfocu/public_html/wp-content/plugins/enable-media-replace/upload.php on line 60

    Warning: Cannot modify header information – headers already sent by (output started at /home/sidtfocu/public_html/wp-content/plugins/enable-media-replace/upload.php:60) in /home/sidtfocu/public_html/wp-includes/pluggable.php on line 876
    Thank you for creating with WordPress.

    Version 3.5

    https://www.ads-software.com/extend/plugins/enable-media-replace/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hm. I was afraid of this. I’ll probably have to supress those errors, since they indicate that you have different sizes of thumbs in your file system than WordPress’ database thinks you do.

    This is related to the solution from this thread:
    https://www.ads-software.com/support/topic/deleting-too-many-images-due-to-dimensions-and-naming?replies=4

    Hi
    I have the same issue, and in my case it was because the different image sizes are generated on demand, so the files don’t exist. I fixed adding a simple file_exists() before the unlink().

    Yes, I will do the same. Hopefully I’ll get the chance to update the plugin today.

    Mans, did you get a chance to make this change to the plugin?

    I deleted the image files from the server and need to re-upload them. I was hoping to use your plugin so the new files get uploaded in the right date folder and not break existing links…

    Unfortunately I get errors, presumably because the plugin expects to find the file on the server before it take in the new one.

    I am not a PHP coder but maybe you can tell me what/where I need to edit to have the plugin upload the file even if it cannot find the original at the location indicated by the database.

    Thanks!!!

    This will be fixed in 2.9.1 which I’ll push shortly.

    That’s great. For now I had to replace images using FTP in the correct directories but for the future and other people loosing image folders and relying on only the database backup, this could be invaluable.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I got a bunch of errors’ is closed to new replies.