Last modified: 2014-05-16 21:13:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27523, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25523 - Impossible to move dwg files
Impossible to move dwg files
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Low normal with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-14 15:03 UTC by Lucas
Modified: 2014-05-16 21:13 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lucas 2010-10-14 15:03:21 UTC
Uploading is dwg files is fine. 

$wgFileExtensions = array( 'dwg', 'jpg', 'png', 'gif', 'jpeg', 'pdf', 'txt' );

But moving is impossible.

File:Test 1.dwg >> File:Test 2.dwg = "The new file extension does not match its
type".

Tried adding variations of following to mime.info & mime.types with no luck:

image/vnd.dwg image/x-dwg application/acad     [DRAWING]

Image table for all .dwg files has the following field values:
img_media_type = UNKNOWN
img_major_mime = unknown
img_minor_mime = unknown

Not sure this is even considered a bug.
Comment 1 Bawolff (Brian Wolff) 2010-10-14 21:36:33 UTC
removing keyword need-review, since this doesn't need review (there's no patch or anything else to review). Not sure if easy is appropriate either, but leaving that be as I'm not sure what the criteria for "easy" actually is. 

>Not sure this is even considered a bug.

I'd imagine this is a bug, as if you were able to get past the mime type checks at upload, you should also be able to when moving the file.
Comment 2 Arlen Beiler 2010-12-28 15:03:56 UTC
I also have this problem with MP3 files in 1.16.0.
Comment 3 Arlen Beiler 2010-12-28 15:05:36 UTC
My config is:

$wgCheckFileExtensions = true;
$wgStrictFileExtensions = true;
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'wav', 'mp3', 'pdf' );

And I am moving from "File:Daily Inspirations 1010-12-9.mp3" to "File:Daily Inspirations 1010-12-9.mp3". I do have Admin access.
Comment 4 Lucas 2010-12-28 18:25:27 UTC
Added mp3 move-bug reference link.
Comment 5 Arlen Beiler 2010-12-28 20:26:32 UTC
Fixed by doing this: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66069
Comment 6 Lucas 2010-12-29 15:35:54 UTC
Perhaps there is a similar subtle/random fix for subject .dwg files?
Comment 7 Lucas 2010-12-29 16:25:36 UTC
Here's a workaround...
Added this line to mime.info:
application/acad application/x-acad application/autocad_dwg image/x-dwg application/dwg  application/x-dwg application/x-autocad image/vnd.dwg drawing/dwg [DRAWING]

And added this line to mime.types:
application/acad dwg

This seems to assign a valid mime type to dwg files on upload and allows them to be moved thereafter.

Still, why it doesn't allow moving while being an unknown type is beyond me. I'd rather have just left it alone. Will have to manually fix my image table to compensate for old files I suppose.
Comment 8 Bryan Tong Minh 2010-12-29 20:12:30 UTC
I could add a new config option to enable moving of unknown files, or I could just do that unconditionally. Does anybody have anything against the latter option?
Comment 9 Bryan Tong Minh 2011-02-10 15:26:47 UTC
Thinking about it, this should follow the same configuration options as regular uploading, so $wgCheckFileExtensions and $wgStrictFileExtensions.
Comment 10 Lucas 2011-02-10 18:35:19 UTC
I had tried different combinations of settings of $wgCheckFileExtensions and $wgStrictFileExtensions (before finally re-doing the mime info). Still had the same problem (moving unknown file types). Not sure if anyone else could verify that.
Comment 11 Mark A. Hershberger 2011-02-14 20:23:44 UTC
Bryan, I like the idea you mentioned on r66069 better: make the mime checks check for non-canonical types as well as canonical types.
Comment 12 Bryan Tong Minh 2011-02-15 10:37:33 UTC
(In reply to comment #11)
> Bryan, I like the idea you mentioned on r66069 better: make the mime checks
> check for non-canonical types as well as canonical types.

I'm not sure if that would fix the dwg issue, as there is no entry for dwg in mime.info
Comment 13 Mark A. Hershberger 2011-02-18 21:55:44 UTC
r82418 -- added mime.info information
Comment 14 [[kgh]] 2011-02-27 11:02:53 UTC
I am not sure if I should open an new bug report. I wanted to move an .eml file but get "The new file extension does not match its type" as an error message. (MW 1.16.2)
Comment 15 Andre Klapper 2014-05-16 20:38:49 UTC
I'm curious if this is still a problem?
Comment 16 [[kgh]] 2014-05-16 21:13:18 UTC
Hmm ..., just tryied to check at least for eml-files. However even though I set $wgVerifyMimeType = false; and added "eml" to the array of $wgFileExtensions it is not possible to upload eml-files on MW 1.23-rc.1. Will have to check this tomorrow. Either I misunderstood something which is possible or it is a bug. I will report another nasty bug reappearing which is there for over a year now. To cut it short: It's obviously already to late today.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links