• 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/

Viewing 1 replies (of 1 total)
  • 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?

Viewing 1 replies (of 1 total)
  • The topic ‘File name not changing, Permalink breaking, links not updated when replacing PDF’ is closed to new replies.