• Resolved Paul Biron

    (@pbiron)


    Suppose I have foo.pdf in my media library.

    When I use this plugin (v 3.5.0) to replace it with bar.pdf (by selecting Replace the file, use new file name and update all links in the Replacement Options section), the file does get replaced in the Media > Library screen and all existing links to the old file are replaced with links to the new file.

    However, if I look in the uploads folder, foo.pdf is still there (all the old thumbnails get deleted, but the “main” file doesn’t).

    Besides needlessly taking up disk space, this is a problem if I subsequently decide that I want the old file back in my media library and I replace bar.pdf with foo.pdf (by selecting Replace the file, use new file name and update all links in the Replacement Options section). In that case, because of core appending -1, -2, etc to the basename of uploaded files I end up with a URL of the form https://domain/wp-content/uploads/{date}/foo-1.pdf.

    While that’s not a major problem, but I’m wondering if there is a specific reason you only delete the thumbnails and not the original file in this case. Is that a bug, or was it a “design decision”?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi Paul,

    I just tried to reproduce the issue but from my side all the files, including the original one, are getting replaced.

    Perhaps there is a conflict with some other plugin. Could you please deactivate all plugins except Enable Media Replace and try again? If it works, then we know for sure that another plugin is the source of the issue 🙂

    Thank you!

    Thread Starter Paul Biron

    (@pbiron)

    Thank you.

    You are correct and I have discovered the plugin that is causing the problem.

    I will contact the author of that plugin and see if I can resolve this with them.

    Please keep this topic open for a little bit while I try to reach the author of that other plugin.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Sounds good 🙂

    May we know what plugin it is?

    Likewise, what was the plugin that was giving you issues?

    Thread Starter Paul Biron

    (@pbiron)

    Sorry, been busy.

    The plugin that I think is causing the conflict is Polylang (free).

    Thanks for the information.
    I confirm, the Polylang plugin prevents the old file from being deleted

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘“Replace the file, use new file name” leaves the old file in uploads filder’ is closed to new replies.