Commons:Village pump/Technical/Archive/2024/01

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

How to resolve the "illegal namespace" error?

I'm trying to upload an SVG I created using diagrams.net, but MediaWiki gives me a This SVG file contains an illegal namespace "http://www.w3.org/1999/xhtml" error. I tried to remove the xmlns="http://www.w3.org/1999/xhtml" attributes from the file, but this causes the text to not display at all. How do I resolve this issue? Ixfd64 (talk) 23:00, 10 January 2024 (UTC)

@Ixfd64: Is the SVG simple enough that you can post its contents (before you removed the xmlns attributes) as a code block
like this?
CalendulaAsteraceae (talkcontribs) 23:23, 10 January 2024 (UTC)
Here's the code:
Extended content
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file with editors other than draw.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
	xmlns="http://www.w3.org/2000/svg"
	xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="641px" height="341px" viewBox="-0.5 -0.5 641 341" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2024-01-10T23:26:48.432Z&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0&quot; etag=&quot;5eROD36ty86c8WJt2PFq&quot; version=&quot;22.1.18&quot; type=&quot;device&quot;&gt;&lt;diagram name=&quot;Page-1&quot; id=&quot;pDQlNdjf5s7TNPz2gkAM&quot;&gt;7ZpRk6I4EMc/jY8zBSQgPjo6613V3dVuTV3d7r0xEjG1kXghjrqffhMJShJGWYXBG+dJ0glt/PfPTifQA6PFZsKi5fxPGiPS85x40wPjnue5wAXiQ1q2uSUYhLkhYThWgw6GJ/wDKaOjrCsco0wbyCklHC9145SmKZpyzRYxRtf6sBkl+rcuowRZhqdpRGzrPzjm89wa+s7B/hvCybz4ZtdRPYuoGKwM2TyK6bpkAo89MGKU8vxqsRkhIsUrdMnv+/RK735iDKW8zg1f2OZbsuCjvyds+de/E+L9/n1wp7y8RGSlfrCaLN8WCggvQmzReFjPMUdPy2gqe9Yi3sI25wsiWq64tCdUeEeMo03JpCY4QXSBONuKIUVvoZ6iBRTirQ/au4GyzUu6h8oWqXAne9cHRcSFEuUXBPIsgYacM/y84mg3LTErMRMxEZRx6SudUSZCj2kq4Y1waukppOC6cBln9DsaUUKZsKQ0lWLPMCGGKSI4SUVzKgRGwv4ghcWC1aHqWOA4Jq9FitFVGiP5W52GguWawfLtYMGKYPXbCha4LppBoAvkdU4zvJxmJ8EvSH4O3y/ZoG8Grmuy+9dNNuyc7LBBske3QzbsnOzBabJ1Fd6ebgAr6PYqRIJtiVSstCWVxmiKsxxf9x3zGpqhsHkNKyIBWouEXRB2zmtgVM3Q6ZxXuxK7DV4DzwxF17zaJd/V8ep1z6v/wasKRce8gipeAyLVntGUa2EI/lvRouMu2x0dDWW4/OVmp07RL64S+TkqPImZ5c5yuxVelMZDeXYk40SiLMNTPdh6GNAG86+qR15/k/Z7X7XGm9Kw8bZopEKsr+VG6S7ZPNy2a21PhTyjKzZFxxDPx/GIJYgfGad2GijWzsVeBci5dzWA7ooJMUREef2iH6NV4aJcf6Z4F17l1zN3GP3Bva87yX+yus8rHXwZrqzNirkJyTU54qgYSGezDGljdozvVbkA++B0mr5lKgc1qbyQOtcoN2HgnMecd8rRK8yJAEfb0rClHJC1QRysKmQbSrQPtROtiOcf0TMiOsn1F0mGxHSi550/SaLSSzj3H3r+uJLN439Ac+ncP1pQ39Irn95XZ0THB6GRFBvJiX3dqdvXHbSXnaC9/WyMlWFLi/KZqeyctNl++gOXLcpNrcnmZvzc7Gjt6hvLjm+5ZsP/w9Yq7HprBY9urWzF3u/WKux4awVr1Jhd8wq759V+1HKbvMLOea16NNBQ1TG+5aMAULPqKM4O65cdnkaQGzZSdvhGjnDNZ1F1yw4z2ViOruAgwK96I6ch6B8/oD8NPbwQ+rumqAdG+XBusR2Yb6FcI/VVb+40RP2nW6a+XzfVe9eR6g3o908yfxl68920mjvMN4W+xUcdkw/oa6T64DpTfWPUQ3OX1Cr1onl4mzkffngnHDz+BA==&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);">
	<defs/>
	<g>
		<ellipse cx="90" cy="170" rx="80" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="20" y="135" width="140" height="70" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 170px; margin-left: 21px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Attribute with highest information gain</div>
						</div>
					</div>
				</foreignObject>
				<text x="90" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Attribute with highest...</text>
			</switch>
		</g>
		<ellipse cx="350" cy="70" rx="80" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="280" y="35" width="140" height="70" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 70px; margin-left: 281px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Attribute with highest information gain given A</div>
						</div>
					</div>
				</foreignObject>
				<text x="350" y="74" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Attribute with highest...</text>
			</switch>
		</g>
		<ellipse cx="350" cy="270" rx="80" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="280" y="235" width="140" height="70" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 270px; margin-left: 281px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Attribute with highest information gain given C</div>
						</div>
					</div>
				</foreignObject>
				<text x="350" y="274" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Attribute with highest...</text>
			</switch>
		</g>
		<rect x="270" y="150" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="290" y="155" width="80" height="30" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 170px; margin-left: 291px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Decision 1</div>
						</div>
					</div>
				</foreignObject>
				<text x="330" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Decision 1</text>
			</switch>
		</g>
		<rect x="510" y="210" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="530" y="215" width="80" height="30" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 230px; margin-left: 531px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Decision 1</div>
						</div>
					</div>
				</foreignObject>
				<text x="570" y="234" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Decision 1</text>
			</switch>
		</g>
		<rect x="510" y="10" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="530" y="15" width="80" height="30" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 30px; margin-left: 531px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Decision 1</div>
						</div>
					</div>
				</foreignObject>
				<text x="570" y="34" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Decision 1</text>
			</switch>
		</g>
		<path d="M 170 170 L 265.5 265.5" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 269.21 269.21 L 261.78 266.73 L 265.5 265.5 L 266.73 261.78 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 240px; margin-left: 210px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">C</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="210" y="243" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">C</text>
			</switch>
		</g>
		<path d="M 170 170 L 263.63 170" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 268.88 170 L 261.88 173.5 L 263.63 170 L 261.88 166.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 156px; margin-left: 231px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">B</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="231" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">B</text>
			</switch>
		</g>
		<path d="M 170 170 L 265.5 74.5" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 269.21 70.79 L 266.73 78.22 L 265.5 74.5 L 261.78 73.27 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 100px; margin-left: 210px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">A</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="210" y="103" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">A</text>
			</switch>
		</g>
		<rect x="510" y="90" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="530" y="95" width="80" height="30" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 110px; margin-left: 531px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Decision 2</div>
						</div>
					</div>
				</foreignObject>
				<text x="570" y="114" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Decision 2</text>
			</switch>
		</g>
		<rect x="510" y="290" width="120" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
		<rect x="530" y="295" width="80" height="30" fill="none" stroke="none" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 310px; margin-left: 531px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Decision 2</div>
						</div>
					</div>
				</foreignObject>
				<text x="570" y="314" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Decision 2</text>
			</switch>
		</g>
		<path d="M 430 70 L 504.3 32.85" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 509 30.5 L 504.3 36.76 L 504.3 32.85 L 501.17 30.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 30px; margin-left: 470px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">D</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="470" y="33" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">D</text>
			</switch>
		</g>
		<path d="M 430 70 L 504.3 107.15" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 509 109.5 L 501.17 109.5 L 504.3 107.15 L 504.3 103.24 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 110px; margin-left: 470px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">E</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="470" y="114" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">E</text>
			</switch>
		</g>
		<path d="M 430 270 L 504.3 232.85" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 509 230.5 L 504.3 236.76 L 504.3 232.85 L 501.17 230.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 230px; margin-left: 470px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">F</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="470" y="233" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">F</text>
			</switch>
		</g>
		<path d="M 430 270 L 504.3 307.15" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
		<path d="M 509 309.5 L 501.17 309.5 L 504.3 307.15 L 504.3 303.24 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
		<g transform="translate(-0.5 -0.5)">
			<switch>
				<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
					<div
						xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 310px; margin-left: 470px;">
						<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
							<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
								<font style="font-size: 15px;">G</font>
							</div>
						</div>
					</div>
				</foreignObject>
				<text x="470" y="314" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">G</text>
			</switch>
		</g>
	</g>
	<switch>
		<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
		<a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank">
			<text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text>
		</a>
	</switch>
</svg>
I ran it through a pretty print formatter. Ixfd64 (talk) 23:35, 10 January 2024 (UTC)
http://www.w3.org/1999/xhtml is an HTML namespace, not an SVG one. You probably try to upload an HTML file with .svg extension; this will of course not work. —Tacsipacsi (talk) 23:28, 10 January 2024 (UTC)
That is an SVG file, but it is a mess. It can display text two ways: first with XHTML code and second with conventional SVG text elements. See if the tool can emit plain SVG (no foreignObjects). Alternatively, delete every foreignObject element and the final switch element.
Glrx (talk) 02:42, 11 January 2024 (UTC)
@Ixfd64: see https://www.drawio.com/doc/faq/svg-export-text-problems for suppressing foreign objects. Glrx (talk) 06:04, 11 January 2024 (UTC)
I'll play around with the settings and see if there's an option that disables foreign objects. Thanks. Ixfd64 (talk) 07:29, 11 January 2024 (UTC)
The error went away after I selected the "Convert labels to SVG" option. Thanks again! Ixfd64 (talk) 22:16, 14 January 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Ixfd64 (talk) 22:16, 14 January 2024 (UTC)

Need help of someone that knows C#

I administer monthly Commons:Photo challenge for Last 8 years. The process we use is described at Commons:Photo challenge/Maintainers Manual , but to keep it short we mostly rely on 2 C# codes written a decade ago by User:Colin for automatically processing of Photo Challenge pages. The codes:

went almost unchanged since they were written and they are meant to be run on your PC in Visual Studio. This month, the codes stopped compiling for me and so far I was not able to create voting pages or score last month results. I am very familiar with dozen programing languages but I do not know C# and its external libraries management. I suspect the issue is with changing C# language standards and lack of backwards compatibility. Can someone familiar with C# can help me getting those 2 codes to run? Jarekt (talk) 04:12, 7 January 2024 (UTC)

being a noobish coder, i'd throw the code into chatgpt and ask it to rewrite a python version? or a language that you use. :p RZuo (talk) 10:26, 7 January 2024 (UTC)
I've responded to Jarekt on another page. I'll have a look see what the problem is. -- Colin (talk) 19:01, 7 January 2024 (UTC)

Searching on "Highgate tube station" - pics of Archway tube station also appear!

Searching on "Highgate tube station" (a station on the London Underground system) also brings up pictures of the nearby "Archway tube station". A glitch in the system? Best, Sunil060902 (talk) 13:41, 8 January 2024 (UTC).

@Sunil060902: Assuming you're using Special:MediaSearch and typing without quotation marks, I see similar results: after about 50 pictures of Highgate station I start getting photos of Archway as well. I think this is because those photos have structured data indicating that they depict Archway tube station (Q636351), and that Wikidata item has aliases that include "Highgate tube station" (because that's what Archway used to be called). So I think this is intended behaviour: Special:MediaSearch thinks that by "Highgate tube station" you might mean that one that used to be called "Highgate" and returns files for that as well as for the current Highgate. If you want a search that doesn't use Wikidata (and generally tries less hard to be helpful) you can use Special:Search instead. And for cases like this, just using the category Category:Highgate tube station is likely to give even fewer bad results. --bjh21 (talk) 14:13, 8 January 2024 (UTC)
Hi bjh21, thanks for that. Seems to work, and I do remember the history re. naming. But just to let you know I actually was using quotes in the MediaSearch! I noticed it also when searching specifically for my own pictures of Highgate - namely Sunil060902 "Highgate tube station".
https://commons.wikimedia.org/w/index.php?search=Sunil060902+%22Highgate+tube+station%22&title=Special:MediaSearch&go=Go&type=image
Twelve results, five of which are pictures of Archway. At least those are my own! Best, Sunil060902 (talk) 14:27, 8 January 2024 (UTC).
@Sunil060902: Yes, since the alias in Wikidata is precisely "Highgate tube station" the quotation marks aren't enough to exclude it. I mentioned not using them because when I started that reply I thought the cause would be stray uses of "Highgate" in descriptions like on File:Archway station (3749849371).jpg, but that turned out not to be relevant. --bjh21 (talk) 14:56, 8 January 2024 (UTC)

Tech News: 2024-02

MediaWiki message delivery 01:17, 9 January 2024 (UTC)

Which file has the largest number of associated timedtext pages

i'm wondering how mediaplayer's selection menu for cc looks like if there're a hundred languages to choose from. RZuo (talk) 10:47, 7 January 2024 (UTC)

@RZuo: The clear winners are File:Sit-in Against Racial Injustice, Downtown Indianapolis (2020-06-06).webm with impressive 201 languages (and only seven seconds) and File:Silence.ogg with 186 languages (and 18 seconds). —Tacsipacsi (talk) 00:52, 10 January 2024 (UTC)

Structure of the upload path of files

Hi. I was checking the strcture of the url to files here on Commons. Someone pointed out to me that to create a thumbnail in an excel data sheet you need that, not the page url (I trusted that assetion, I haven't checked), so they asked me how to extract it.

That's how (after so many years) I have noticed that the url to the file is not "direct", and there is also a short string between the first part ''https://upload.wikimedia.org/wikipedia/commons/'' and the actual file name:

  • ''https://upload.wikimedia.org/wikipedia/commons/'' f/f2 /Ricci_di_castagno.jpg / [4]
  • ''https://upload.wikimedia.org/wikipedia/commons/'' 2/22 /"Pizza"_ai_funghi.jpg / [5]
  • ''https://upload.wikimedia.org/wikipedia/commons/'' 0/05 /-_Garzetta_-_Valli_di_Comacchio.jpg [6]

Can someone tell me something about that?

  • First question: what is it about? Soemone told me that maybe it's related to the distrtibuted server where the file is actually stored.
  • Second question: so far I only find it in the format X/XY, where the first number or letter seems to be always identical to the second number or letter (also a/ac, c/c7, 6/65...). Is this correct? What's the "physical" meaning of that, if so?
  • Third question: can it be predicted from the file name or there is no way to do? I suppose it can't.

Thanks in advance. Alexmar983 (talk) 20:57, 9 January 2024 (UTC)

1. Probably. Hashing evenly distributes files to servers. First number is prefix of the second.
2. The file URL numbers are generated from an MD5 hash of the filename. That algorithm should be viewed as opaque: WMF should be able to change it later, and if it does, then the concrete links will no longer work.
3. Yes, it can be predicted, but it is better to use other methods. Special:Filepath will find the image through a redirect. The MediaWiki API will give the filename.
Glrx (talk) 22:00, 9 January 2024 (UTC)

video2commons cannot be accessed normally

This is an auxiliary tool that can parse videos. Recently, it was found that it could not be opened normally, and it was suspected that the website was out of service. Fumikas Sagisavas (talk) 08:36, 11 January 2024 (UTC)

@Fumikas Sagisavas i just used it to upload a vimeo video.
but if you're uploading youtube, then it doesnt work at the moment. other than that it should be working. RZuo (talk) 09:14, 11 January 2024 (UTC)

Image preview is not displayed

I have observed repeatedly that no preview image of an SVG file is shown although the SVG file seems to be valid. What is the reason for this? Some examples: File:Asiatischer Monat 2023 Goldmedaille.svg, File:Asiatischer Monat 2023 Silbermedaille.svg, File:Asiatischer Monat 2023 Bronzemedaille.svg.

Thanks for any suggestions. --Furfur Diskussion 18:01, 12 January 2024 (UTC)

rename without redirect

Template:Rename does not say how this is done (from a script).

I have a few thousand files to rename, recently uploaded, with an errorneous filename.

Thx Nowakki (talk) 15:37, 12 January 2024 (UTC)

@Nowakki: Hi. There is no special parameter in the template to specify such requests, you can ask for it in the request reason (|reason=), the filemover won't refuse if the uploads are recent and unused. Thanks! -- CptViraj (talk) 18:15, 12 January 2024 (UTC)
50,000+ files. At some point the approval will become an automatic operation. I just leave it to them to auto-approve with no redirect? Nowakki (talk) 18:26, 12 January 2024 (UTC)
If you want to have 50,000+ files renamed, you should probably write at Commons:Bots/Work requests instead of flooding the backlog category. There you can explain what exactly you want, including that you don’t want redirects. —Tacsipacsi (talk) 09:25, 13 January 2024 (UTC)
I already have the bot. Nowakki (talk) 10:23, 13 January 2024 (UTC)

tiff files wasting space

There are 98,000 tiff files of Sanborn Fire Insurance Maps on commons, each 140-150MB in size.

With LZW compression such a file typically shrinks by 100MB with a runtime of the tiffcp command on a 3.5ghz cpu at 2 seconds.

in total 10TB of wasted space. Nowakki (talk) 15:34, 13 January 2024 (UTC)

The files could be renewed with compressed file versions, but I do not know how the uncompressed files could be deleted to make the disk space free --PantheraLeo1359531 😺 (talk) 12:28, 15 January 2024 (UTC)
The files can be compressed on the server. No need to upload them again. That would be stupid. Nowakki (talk) 12:48, 15 January 2024 (UTC)
That can only be done by system administrators, so the right place to discuss this is https://phabricator.wikimedia.org/. Yann (talk) 13:01, 15 January 2024 (UTC)
Actually I think system administrators read the technical forum. Or they have lieutenants who do.
In a properly run organization this would be a minor problem and would have been solved years ago. It is my current understanding that commons celebrates a kind of post office mediocrity. Nobody volunteers to be staff. They volunteer to be volunteers. Nowakki (talk) 13:07, 15 January 2024 (UTC)
Anyway, this isn't even the worst. I have been here for 2 weeks or so and already had the pleasure of going against a crust of bureaucracy on a proposal to rename Sanborn map files.
I have learned that it is policy to enshrine whatever bad name choice was made by the original uploader. Although, given that names of mass uploads do not have to be approved, i am fairly sure that there also exists a policy that bad names can always be changed at a later time.
Spent 1.5 weeks building an sqlite database and a bunch of scripts to try and rectify the mess. Spent another week trying to convince what are probably mid level staffers of the benefits. I did everything right, what i got was negative help. The whole thing could have been over with last week. Now it will probably be done a few years down the road. Nowakki (talk) 14:14, 15 January 2024 (UTC)
  • 10TB of 'wasted space' is just how much, in terms of the project's resources? Andy Dingley (talk) 14:54, 15 January 2024 (UTC)
    Don't know. Probably more than 1%, less than 3%. Depends on a lot of factors in the end. Commons doesn't rent Icelandic deep cave long term storage for premium dollar amounts? This is only files from one uploader, not all tiffs on the server. Waste in one place encourages waste in other places, if 10TB is not much then 50TB would only be a small problem. How often is the data replicated and backed up. And so on...
    Seems like an interesting article could be written on the subject. I would read. Nowakki (talk) 15:14, 15 January 2024 (UTC)
    @Andy Dingley I did some math.
    Assume 20 Watt to run 1 CPU core and the hard disk on the conversion job. The process generates 50MB of free space per second.
    That is 1TB in 20,000 seconds at 400 kilowattseconds. Assuming 10 cents per kilowatthour that would mean a 1TB hard disk can be generated effortlessly out of thin air for the price of 1.1 cents. Nowakki (talk) 17:44, 15 January 2024 (UTC)

Tech News: 2024-03

MediaWiki message delivery 00:10, 16 January 2024 (UTC)

MoreMenu

I keep on seeing this weird error on the right top of my system: "Uncaught Error: module already implemented: ext.gadget.MoreMenu". Is this only me? ─ The Aafī (talk) 11:03, 18 January 2024 (UTC)

Upload Wizard issue with file extensions

The Upload Wizard is giving uploaders misleading information about why a given image title cannot be accepted. If you try to upload a file with the image extension included by mistake, the Wizard will warn you to Please choose a different, descriptive title (more info).

Clicking "more info" brings up a box that says this:

There was an error in your submission. The file name you were trying to upload has been blacklisted because it is very common, uninformative, or spelled in ALLCAPS. Please go back and choose a better file name.  When uploading files to Wikimedia Commons, please use a file name that describes the content of the image or media file you're uploading and is sufficiently distinctive that no-one else is likely to pick the same name by accident.
Examples of good file names:
Nodnol skyline from Nodnol City Hall - Aug 2022.jpg
1875 Meeting of Settlers at Falconer Bay, New Nodland.jpg
Pseudohedron with no vertex visible from center.png
Examples of bad file names:
Image01.png
Joe.jpg
DSC00001.JPG
Foo.svg.png
30996951316264l.jpg
PSEUDOHEDRON WITH NO VERTEX VISIBLE FROM CENTER.png
For more information, please see Commons:First steps/Upload form. If you have a good reason for uploading a file with this name, or if you receive this message when attempting to upload a new version of an existing file, please let us know at Commons:Administrators' noticeboard or directly at MediaWiki talk:Titleblacklist.  Be sure to specify the exact name of the file you are trying to upload. Thank you.}}

This information is unhelpful. The problem with the image is that it includes an image description, not that it isn't descriptive enough. Schierbecker (talk) 00:38, 19 January 2024 (UTC)

Request feedback

Hello, I look forward to seeking your feedback on this script, which easily helps copy decoded links of pages/files in one click. It does not, however, currently work on revisions/pages that come through Special:MobileDiff but it perfectly works elsewhere. ─ The Aafī (talk) 07:59, 19 January 2024 (UTC)

great script. exactly the same as what i also wished for https://commons.wikimedia.org/w/index.php?title=Commons:Idea_Lab&oldid=836459487#Big_button_/_keyboard_shortcut_to_copy_pagename_to_clipboard_(add_links) .
i already forked 1 for myself User:RZuo/PagenameCopier.js. for me i dont care about aesthetics so much. i just need the button to be big, really BIG. it'd be even better if there's a keyboard shortcut. :D
i'd also replace the svg with 1 hosted on commons. i found and used File:Copy-outlined-circular-button.svg because it looks unique and stands out from everything else. RZuo (talk) 09:17, 19 January 2024 (UTC)
Thanks for the compliment @RZuo. I'd change the image and also see if I can fit in what you have been looking for. ─ The Aafī on Mobile (talk) 11:20, 19 January 2024 (UTC)
If you want to copy just the wiki links (for interwiki linking purposes), I've a solution for that. I'll do some tweaks later in the day. ─ The Aafī on Mobile (talk) 11:31, 19 January 2024 (UTC)
I did some tweaks and changed the icon with this one from Commons. ─ The Aafī (talk) 18:57, 19 January 2024 (UTC)

Vertical titles on mobile

The titles of sections appear vertical on mobile devices.

Since December 2023 I've been experiencing the titles of sections in mobile to be vertical. I am also experiencing this on Wikipedia and other Wikimedia websites. Does anyone else experience this while using a mobile device? I notice that it is very screen size sensitive, on smaller devices I see this, but on tablet computers and laptops the titles appear different. --Donald Trung 『徵國單』 (No Fake News 💬) (WikiProject Numismatics 💴) (Articles 📚) 23:44, 19 January 2024 (UTC)

Tech News: 2024-04

MediaWiki message delivery 01:01, 23 January 2024 (UTC)

Total Daily Image Views

Do we have a tool that will show the totals for image views similar to the old d.o.s. syntax "*common_image_title.jpg" that poll from the viewer logs? The site wmcloud.org does not allow wildcards * in the lookup and seems to only be able to handle one request at a time. [GLAMorous] on toolforge might be configurable to do it, anyone have any suggestions or experience here? --Don (talk) 21:07, 17 January 2024 (UTC)

do you mean something like https://glamtools.toolforge.org/glamorgan.html ? RZuo (talk) 13:53, 18 January 2024 (UTC)
Hi thank you for the reply, I am familiar with Glam and it does not seem to be configurable to use a wild card * in the search and limits the scope of the search to category by image. What I am looking for is total number of views of ALL images in a category. --Don (talk) 22:25, 18 January 2024 (UTC)
i dont get how this tool doesnt fulfil your wish. if you try the demo, it gives
76 files in category tree.
37 files were viewed, out of 44 used.
235 pages on 66 wikis use those files.
243,106 file views in 2016-01. (= total number of views of ALL images in a category? albeit limited to only a given month.)
Data for 80 pages could not be loaded from the WMF pageview API (404 error). RZuo (talk) 23:00, 18 January 2024 (UTC)
This works thank you. Don (talk) 19:35, 24 January 2024 (UTC)

Is CropTool Working?

I have tried starting CropTool to modify images. It stopped working about 2024-01-19. I use it frequently and have tried to start it with several different images.

I just tried it again and got the following message:

Wikimedia Toolforge Error

This Grid Engine web service cannot be reached. Please contact a maintainer of this tool.

Tool maintainers can find more details from the documentation on Wikitech.

I have spent over an hour trying to figure out where to post my problem. This was my best guess. I am too old to figure out who the maintainer is. I do not have a talk page on Wikimedia. User-duck (talk) 01:09, 22 January 2024 (UTC)

I reformatted the above message to fix heading levels. –IagoQnsi (talk) 03:01, 23 January 2024 (UTC)
Having the same issue – seems to be completely down. Looks like a GitHub issue was opened yesterday. –IagoQnsi (talk) 03:01, 23 January 2024 (UTC)
I opened a Phabricator ticket: phabricator:T355633. –IagoQnsi (talk) 03:15, 23 January 2024 (UTC)
Thank you. User-duck (talk) 18:44, 23 January 2024 (UTC)
@User-duck@IagoQnsi it's working for now. use it before it disappears again on 14 feb. RZuo (talk) 18:55, 23 January 2024 (UTC)
@IagoQnsi: Why is CropTool going to disappear? I know this is Wikipedia/Wikimedia and mysterious things happen. User-duck (talk) 13:05, 24 January 2024 (UTC)

SVG map not rendering correctly

I've uploaded this file, and I don't know why, but it doesn't render the texts properly, unless you open it directly, or outside wikimedia.

Map of the Nort-eastern Asian Languages in danger

Ewithu (talk) 13:54, 24 January 2024 (UTC)

I'm afraid I'm not sure, but I did discover that the file has 295 embedded PNGs, which mostly seem to be things like borders for the legend at the top and text fragments like "Nor". —CalendulaAsteraceae (talkcontribs) 04:50, 25 January 2024 (UTC)
@Ewithu: The primary issue is the file does character placements, something that librsvg (the wiki SVG to PNG rasterizer) does not support. You will get many such warnings at Commons:Commons SVG Checker. It looks like that error causes the tspan elements to just add to the last string rather than move to the expected location. The file is also poorly organized with labels placed in tspan subelements rather than their own text elements. Glrx (talk) 05:24, 25 January 2024 (UTC)
Thank you very much @Glrx!
I tried fixing it, it looked like I managed, but when I uploaded as a new version, somehow it's still messed up :/
I'm not too skilled with svg programing so I cannot manually fix what's broken. Should I upload it as a large png image instead? Ewithu (talk) 17:38, 25 January 2024 (UTC)
If you have another device, try viewing the image on that. You might be looking at an old cached version of the image. It looks good to me now. Soap (talk) 18:20, 25 January 2024 (UTC)
Ah, you are right. Thanks! Ewithu (talk) 20:16, 25 January 2024 (UTC)

Toggle the proceed button on/off for filemovers

what is responsible for the popup for filemovers to move files? a gadget?

i have a suggestion for it. it'd be good if the proceed button, or "hitting the enter key to proceed", can be toggled on/off temporarily.

it has happened occasionally that while you are editing the intended filename you accidentally hit enter, then the file gets moved to a wrong name. this is especially a trouble for me as i use input methods for cjk chars, which often involve hitting the enter key.

notice how the proceed button greys out if the filename field is less than 8 chars. a button to toggle the proceed button off like that would be good.

or even better, as long as cursor is active in the filename field it should grey out the proceed button. RZuo (talk) 07:06, 27 January 2024 (UTC)

Template protection banners inconsistency

File:Nominate for deletion sidebar.png (which is used at Commons:Deletion requests as example) is template protected. This is mentioned in the edit notice of the page:

This page is currently protected, and can be edited only by template editors and administrators.

However, when viewing the file File:Nominate for deletion sidebar.png, the banner says:

This page is currently protected, and can be edited only by administrators.

which is misleading. —⁠andrybak (talk) 21:02, 27 January 2024 (UTC)

How to remove unnecessary audio from video

The video file File:Arc melted rhenium block.webm comes from Flickr. When I shot the video, I accidentally recorded music that may be copyrighted. Can you please remove the audio part of this video? Thank you! Fumikas Sagisavas (talk) 07:32, 23 January 2024 (UTC)

you can try com:videocuttool, or ask a sysop to import it again without the audio for you.
next time when you use v2c, make sure unselect "audio" if you dont want it. RZuo (talk) 08:27, 23 January 2024 (UTC)
MKVToolNixGUI also allows the removal of audio stripes --PantheraLeo1359531 😺 (talk) 19:15, 29 January 2024 (UTC)

Tech News: 2024-05

MediaWiki message delivery 19:28, 29 January 2024 (UTC)

UploadStash documentation

it'd be great if someone can write something at Commons:UploadStash about Special:UploadStash, like how long the temporary files are stored in the stash.

or maybe you can point to where the actual documentation about this is. i made it a soft redirect to where the doc is supposed to be but the target page is certainly abandoned and outdated. RZuo (talk) 10:49, 29 January 2024 (UTC)

I made a start. Is there anything in particular you think should be included? Bawolff (talk) 09:16, 22 February 2024 (UTC)
thx a lot. i was just looking for how long (48 hours). RZuo (talk) 11:16, 22 February 2024 (UTC)
Ah yes, its 48 hours, controlled by $wmgUploadStashMaxAge in InitialiseSettings.php [23]. It should be noted there is currently a bug where sometimes stash files get reported as being deleted way before it should. We think it happens when multiple mediawiki jobs try to assemble the file at the same time, and one deletes the file out from under the other one and we are working to try and fix it. Bawolff (talk) 19:42, 22 February 2024 (UTC)