Last modified: 2011-03-14 20:20:29 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 T26991, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24991 - File extension does not match MIME type
File extension does not match MIME type
Status: RESOLVED WORKSFORME
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.osafoundation.org/images/o...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-31 05:28 UTC by starofsouth
Modified: 2011-03-14 20:20 UTC (History)
2 users (show)

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


Attachments

Description starofsouth 2010-08-31 05:28:36 UTC
I think the file is perfectly valid, yet I'm unable to upload it. (I'm not 100% about it's licensing so it might not belong to Commons but that's not the issue here, this seems like a bug.)
Comment 1 Rainald Koch 2011-03-13 21:13:23 UTC
Yes, this seems like a bug. I permanently get this error too with a hand written svg file containing valid svg code as checked by the w3c validator as well as by Jarry1250's SVG Check. I found similar questions at Commons:Help desk/Archive but no solution. I studied a dozen of Bugzilla's threads, removed the <Title> tag and have no nested <g> (Bug 4388).
Comment 2 Bryan Tong Minh 2011-03-13 21:18:28 UTC
Can somebody at WMF run MimeMagic::singleton()->guessMimeType() on that file?
Comment 3 Rainald Koch 2011-03-13 21:21:15 UTC
Here is the code:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" 
 viewBox="0 0 800 500" width="100%" height="100%" >

 <defs>
    <marker id="Arrow"
      viewBox="0 0 5 4" refX="3" refY="2" 
      markerWidth="5"  markerHeight="4"
      orient="auto">
      <path d="M1 2L0 0L5 2L0 4z" />
    </marker>
    <linearGradient id="Gradient" gradientUnits="userSpaceOnUse"
                    x1="0" y1="0" x2="800" y2="0">
      <stop offset="0"   stop-color="white" stop-opacity="0" />
      <stop offset=".06" stop-color="white" stop-opacity="0" />
      <stop offset=".09" stop-color="white" stop-opacity="1" />
      <stop offset=".94" stop-color="white" stop-opacity="1" />
      <stop offset=".97" stop-color="white" stop-opacity="0" />
      <stop offset="1"   stop-color="white" stop-opacity="0" />
    </linearGradient>
    <mask id="Mask" maskUnits="userSpaceOnUse"
          x="0" y="0" width="800" height="500">
      <rect x="0" y="0" width="800" height="500" fill="url(#Gradient)"  />
    </mask>
	<symbol id="trace">
		<path fill="none" stroke-width="4"  d="M-50 260L100 400L400 120L700 400L1000 120"/>
	</symbol>
 </defs>
 
 <path d="M40 466V 20" stroke="black" stroke-width="3" marker-end="url(#Arrow)" stroke-linecap="square" />
 <path d="M40 466H780" stroke="black" stroke-width="3" marker-end="url(#Arrow)" />
 <text x= "15" y= "60" style="font-size:24px">f</text>
 <text x="740" y="490" style="font-size:24px">t</text>
 <g mask="url(#Mask)" >
  <use stroke="#aaf" xlink:href="#trace" x="-10" y=" 0"  />
  <use stroke="#ddd" xlink:href="#trace" x=" 50" y=" 0"  />
  <use stroke="#faa" xlink:href="#trace" x=" 50" y="-80" />
 </g>
 <path d="M 50 420h 36" stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <path d="M190 420h-36" stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <text x="120" y="420" text-anchor="middle" baseline-shift="-30%" style="font-size:24px">&#916;t</text>

 <path d="M320 120h145" stroke="black" stroke-width="2" />
 <path d="M320  40h145" stroke="black" stroke-width="2" />
 <text x="320" y="80" baseline-shift="-30%" style="font-size:24px">&#916;f<tspan style="baseline-shift:sub;font-size:0.85em">D</tspan></text>

 <path d="M250 190v33"  stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <path d="M250 287v-33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <text x="180" y="210" style="font-size:24px">&#916;f<tspan style="baseline-shift:sub;font-size:0.85em">auf</tspan></text>

 <path d="M550  96v33"  stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <path d="M550 306v-33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" />
 <text x="535" y="200" style="font-size:24px">&#916;f<tspan style="baseline-shift:sub;font-size:0.85em">ab</tspan></text>
</svg>
Comment 4 Bryan Tong Minh 2011-03-13 21:22:35 UTC
Just tried the file in  comment #0 and that one is actually uploading without any problems.
Comment 5 Bryan Tong Minh 2011-03-13 21:29:38 UTC
Closing WORKSFORME for comment #0

Comment #3 hits bug 27544; the file is actually not valid XML; if I load it with Firefox it gives "XML Parsing Error: prefix not bound to a namespace"
Comment 6 Rainald Koch 2011-03-14 20:20:29 UTC
Thank you for the hint at the namespace; xlink was missing.

Thank you for the hint at bug 27544; I reopened it for the mere reason to urge the developers to make the error messages more informative.

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


Navigation
Links