file.xlsx changes to file.xlsx.xls and excel complains its not the right format. file.docx opens fine.
This is easily recreated by saving any excel file (xlsx format) and uploading it. When attempting to download, it renames it by adding .xls. If this is a known issue I couldn’t find the post on it.
Thanks if you can help.
[No bumping, thank you.]
this is happening on a new install with MS Word documents whereby the extension .docx changes to .docx.doc
did you ever get a reply and solution?
No reply. No solution. Just moderation and mistaken of “bumping” when attempting to add troubleshooting data and ask questions :-\. THANK YOU at least your reply verifies the issue. Can we get a reply from anyone that (xlsx) works and doesn’t rename to xlsx.xls?
bob291 I can upload test.docx and it does not rename it for me, only xlsx is changed. What is your result with an xlsx file?
when i upload a .docx or just now a .xlsx the upload folder contains the correct file extension. however when i try to download either of those files it changes the .docx and .xlsx to .docx.doc and .xlsx.xls respectively and the program complains about the format and won’t open them. so it happens for me with both .docx and .xlsx and only when downloading the file.
I am not able to recreate this issue (just tested with .docx using 3.5 and 1.3.3).
I can confirm that the file is being stored on the server with the proper extension.
Does this happen across browsers?
I believe it may be related to the content type header being served. The code is taken from
ms-fileswithin core, but may need an update (https://github.com/benbalter/WP-Document-Revisions/blob/master/wp-document-revisions.php#L723).
I created an issue on GitHub to track the bug’s progress. https://github.com/benbalter/WP-Document-Revisions/issues/37
Is this only a problem when using IE? I have seen a similar problem with many other systems when downloading files with IE; it changes/adds the extension that it thinks should be there.
I have been unable to recreate this issue in the following scenarios, using Google Chrome, Firefox, Safari, IE9, IE8, and Google Docs (to create and save files in .xlsx and .docx), WP 3.5.1, :
1. Create and save a document (file.docx) in Google Docs in .docx format
2. In WordPress, create a new document
3. Upload file.docx to WordPress
4. Download file.docx from the backend by clicking the “download” link
5. Download file.docx after being inserted in a published post
6. File correctly displays the .docx file format without the addition of .doc
1. Create and save a document (file.xlsx) in Google Docs in .xlsx format
2. In WordPress, create a new document
3. Upload file.xlsx to WordPress
4. Download file.xlsx from the backend by clicking the “download” link
5. Download file.xlsx after being inserted in a published post
6. File correctly displays the .xlsx file format without the addition of .xls
Maybe IE 7 is the issue? If anyone is still encountering this issue and could give some more information on what version of WordPress, WP Document Revisions, and what browser they’re using, that would great.
Just uploaded a docx. Tried to download it and got a 404
/documents/2013/05/mvp-revision-1.docx where mvp-revision-1.docx is native name of word file.
Would you be able to post back here with what version of WordPress, WP Document Revisions and browser you we’re using when it happened (and if possible, what sort of stack you’re on)? It would be very helpful in trying to figure out what’s going on.
Opened same docx, saved as doc, uploaded then downloaded without a hitch.
WordPress version 3.5.1
Word for MAC 2011, version 14.3.4 (130416)
Used Chrome 26.0.1410.65 Safari Version 6.0.4 (8536.29.13) replicated the issue in both.
Very strange. I would say this might be a permalinks related issue, but the fact that you can download files that end in .doc but not .docx seems a bit odd…
Sorry for all the questions, but the more info the better chance there is of figuring this out. Do you have the most recent version of WP Document Revisions? Are you using the WP Document Revisions ‘document_extension’ filter in any way? Did you change the WP permalinks recently? Do you have any other plugins (seo especially) installed?
I’m experiencing the same problem with .xlsx files. .docx files work as expected.
The file is uploaded and listed in the Documents repository as “.xlsx”. The permalink shows the correct extension.
If you download and try to open the .xlsx file (either within WordPress or by simply pasting the permalink in the browser address bar), the error occurs as described above, with Excel saying that the document is in a different format and trying to open it with .xls appended to the filename. You can bypass the message and open the file, then save it normally as an .xlsx file.
However, in Firefox (21.0) at least, if you choose to save the document instead of opening it, it is saved with the correct .xlsx extension and it opens normally.
I am using:
- WordPress 3.3.1
- WP Document Revisions 1.3.3
- Firefox 21.0
- The topic ‘file.xlsx changes to file.xlsx.xls’ is closed to new replies.