WordPress.org

Ready to get started?Download WordPress

Forums

Enable Media Replace
File name not changing, Permalink breaking, links not updated when replacing PDF (2 posts)

  1. earnjam
    Member
    Posted 1 year ago #

    I'm getting some strange issues when trying to replace a PDF. The PDF I'm uploading has a slightly different filename from the PDF it is replacing and I want to use the new filename because it reflects the date it was updated, so I selected the "Replace the file, use new file name and update all links" option.

    Basically this:
    Old file: pdf_file_v7.2.2013.pdf
    New file: pdf_file_v7.11.2013.pdf

    The old file is being deleted (it returns 404 when trying to load it), the new "File URL" works and returns the new file. That much is good.

    However there are a few problems:

    1. It is keeping the old file name in the "File name" field (pdf_file_v7.2.2013.pdf).
    2. The permalink to the attachment page changes to reflect the new filename, but doesn't work (I assume because because the "file name" value isn't changing.)
    3. None of the links to the PDF are being updated to reference the new "File URL". They still point to the old "File URL".

    Any ideas what might be going on?

    http://wordpress.org/extend/plugins/enable-media-replace/

  2. Måns Jonasson
    Member
    Plugin Author

    Posted 11 months ago #

    Hi, and thanks for the bug report.

    I don't seem to be able to replicate your bug in my installations. I attempted to follow your example by creating two PDF files with the exact file names you provided, so there is nothing with those specific names.

    The only reason WP would not replace the file name is if the command given to re-generate the attachment metadata does not run or fails for some reason. Unfortunately, I don't know of any reason why this would happen.

    Is this problem consistent with every file and file type on your system?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.