Commons talk:Commons SVG Checker
Button "Exexute SVG check"
[edit]Danke für dieses Tool. Wäre es nicht sinnvoll den OK-Haken (steht ansonsten auch für erledigt) vor dem Text durch ein anderes Icon zu ersetzen oder den Button gleich mit dem wikiüblichen Blau zu unterlegen? -- MaxxL - talk 09:43, 28 July 2016 (UTC)
- Hab den nächst-besten Knopf genommen. Die MediaWiki-API für Knöpfe ist auch schon wieder obsolet. Über die Feiertage habe ich etwas Zeit eingeplant.
Does not work in Microsoft Edge browser
[edit]Edge fails at line 175 when accessing elem.children
because Edge does not implement .children
for SVGElement.
Reported as an Edge bug, but don't expect a fix anytime soon (i.e., fall release will not include fix).
Glrx (talk) 19:39, 11 September 2017 (UTC)
- Set a reminder around Christmas holidays to fix that. -- 91.63.162.80 07:46, 4 November 2017 (UTC) aka Menner
- @Menner: Edge claims it has fixed the SVGElement.children bug on 12 December 2017. It should make its way to a public release soon, so I would not bother to fix the bug. Glrx (talk) 12:57, 14 December 2017 (UTC)
- My W10 is updated to the Version https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12481708/ -- Menner (talk) 18:55, 12 March 2018 (UTC)
larger size
[edit]Is it possible to expand the preview size to 7.5 MB or 10 mb? I doubt it will be used often but it would be very helpful. I'm having trouble getting a large file to display (File:CIA WorldFactBook-Political world.svg) and have no way of checking except to continually upload a new file (it doesn't work at https://tools.wmflabs.org/convert/. The file displays fine on its own - the WM converter to PNG preview is where it gets corrupted. Thank you. Wikimandia (talk) 04:06, 15 October 2017 (UTC)
- Hey Wikimandia, I would try before this tool: https://sourceforge.net/projects/svgcleaner/ 7.5 MB seems ok, but 10 MB is imho out of reasonableness of SVG (especially for displaying on Wikipedia articles). -- User: Perhelion 10:50, 15 October 2017 (UTC)
- Thank you, I will try it! I usually don't work with SVG sizes this big, but the need for a really good clean map had me ending up trying to resolve the problem with that file. It's 5.8 MB so just misses the cutoff to work with this tool. Wikimandia (talk) 00:23, 18 October 2017 (UTC)
Why does CommonsSVGChecker not display the text (and also some other simple elements are missing) of File:Georgia regions map2.svg, but in the file it works. (PS: It uses very simple <text> without anything.)
Is the reason that the Wikimedia servers have been updated to librsvg 2.40.16 but SVG Checker is on 2.40.2?
— Johannes Kalliauer - Talk | Contributions 22:30, 13 December 2017 (UTC)
- Hey @JoKalliauer: , this is bug phab:T117530 (fixed).
That is a bit strange because Moritz said"it is fixed on 2.40.16" (Jul 7 2016) It seems 2.40.2 is the old version here. -- User: Perhelion 00:38, 14 December 2017 (UTC)
Upload File not working with my Android phone
[edit]I can check files from Commons, but if I reload the same file from phone storage, the log stops at "Completed file reading!".
I use Chrome 66 running on Android 4.4.2 (Galaxy S4 mini). To get the script running, I have to invoke the alternate page that uses &WithJS parameter. --DmitryKo (talk) 19:27, 15 May 2018 (UTC)
- Also the Chose File button first takes me to Chrome's Select Images window with the the Camera and Browse buttons, then the Complete Chosen Action window which only lists image editing apps, cloud storage apps, and AndroZip file manager, but My Files and Documents are not present there.
- OTOH the W3C XML validator page[1] and the older SVG Check tool[2] both let me directly select Documents / Downloads in the Choose an Action window which opens with their Choose File button. --DmitryKo (talk) 20:57, 15 May 2018 (UTC)
Wiki-Filecheck with "+" in Filename
[edit]If you call the script with https://commons.wikimedia.org/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=File:Oxygen480-mimetypes-application-epub+zip.svg as in User:Perhelion/simpleSVGcheck.js (@Perhelion: ).
It assumes a "+" as a space and recognices File:Oxygen480-mimetypes-application-epub zip.svg which is searched File:Oxygen480-mimetypes-application-epub_zip.svg, but actually it should search File:Oxygen480-mimetypes-application-epub+zip.svg. (Maybe a warning that whitespaces should be replaced with "_" or "+", or maybe search for both?)
If it is too much work, then just say that this is a low priority issue that won't be fixed.
— Johannes Kalliauer - Talk | Contributions 09:33, 23 June 2018 (UTC)
- "+" is a RFC 3986 reserved character and must be encoded. URL encode "+" as "%2B" to get
- That URL checks the "...+zip..." file.
urlencode:File:Oxygen480-mimetypes-application-epub+zip.svg
parser function:File%3AOxygen480-mimetypes-application-epub%2Bzip.svg
- Other functions/templates will give encoded names.
simpleSVGCheck
builds the offending URL by appendingpn
, but at another place (line 619) it builds a URL withencodeURIComponent(pn)
- That is, I think line 48:
href: '/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=' + pn,
- should be
href: '/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=' + encodeURIComponent(pn),
- Glrx (talk) 15:16, 23 June 2018 (UTC)
- @Perhelion and Sarang: You may want to fix line 48 in your sources. Glrx (talk) 17:25, 27 June 2018 (UTC)
- Done Thank you. -- User: Perhelion 22:36, 27 June 2018 (UTC)
- @Perhelion and Sarang: You may want to fix line 48 in your sources. Glrx (talk) 17:25, 27 June 2018 (UTC)
is it down?
[edit]Every picture I render I get:
ERROR: Failed to render SVG file! There are many reasons for thatIt is not distinguishable if the rendered PNG was file was too big or a bug stopped the SVG renderer.
— Johannes Kalliauer - Talk | Contributions 20:39, 18 February 2019 (UTC)
- The error message is produced by MediaWiki:CommonsSvgChecker.js. It calls Rillke's MwJSBot to obtain the PNG; if that fails, then it emits the error message and displays File:Bug_blank.svg.
- So the error is in MwJSBot. I suspect it has been recently modified to use a new mwAPI to render SVGs.
- Glrx (talk) 19:33, 19 February 2019 (UTC)
- I added Currently the renderer is down, you can use https://tools.wmflabs.org/svgcheck/index.php instead. — Johannes Kalliauer - Talk | Contributions 19:49, 19 February 2019 (UTC)
- For me this error still persists, although the above mentioned hint about that was removed. --Tukijaaliwa (talk) 13:39, 18 April 2019 (UTC)
- The original bug seems to be solved, see https://commons.wikimedia.org/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=Test.svg
- @Tukijaaliwa:
- Which file are you processing (give a samplefile below 900kB)
- Can you try https://tools.wmflabs.org/convert/ if there is the same problem?
- — Johannes Kalliauer - Talk | Contributions 17:50, 18 April 2019 (UTC)
- Hi @JoKalliauer: , for some reason it is working now. I dont know if something changed. The last time I tried, the alterantive linked page also didn't load. But now both are working. Greetings Tukijaaliwa (talk) 09:21, 29 April 2019 (UTC)
Feature request: Detect $wgSVGMetadataCutoff problems in multilingual SVGs
[edit]Hi. MediaWiki's SVG Metadata Extractor by default only inspects the first 256 kiB of a file. Elements with systemLanguage
attributes are likely to appear near the end of the file. This caused Europe regions minimal cities.svg to not be detected as a multilingual file, which caused some confusion. It'd be nice if the Checker could emit a warning, when a systemLanguage
that is used after the 256 kiB cutoff doesn't appear anywhere before the cutoff point. Thanks. TilmannR (talk) 13:59, 28 February 2019 (UTC)
Previews aren't generated
[edit]Angry SVG Bug is displayed instead of the actual preview of the file that you want to control. ZandDev (talk) 11:12, 8 October 2023 (UTC)
- See https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&diff=prev&oldid=809629963#RSVG_rendering_preview_on_user:Rillke/MwJSBot.js_not_working
- Tools that use https://convert.toolforge.org/svg2png.php fail.
- Glrx (talk) 16:38, 8 October 2023 (UTC)
is it down? 2
[edit]I get the same behavior described above, even for files, however https://tools.wmflabs.org/svgcheck/index.php works. Maybe the cause is different, but is useful to me to know if it's just my problem or a tool one. ZandDev (talk) 11:22, 8 October 2023 (UTC)
- Ah I was testing File:Placeholder 4-3 blue.svg. --ZandDev (talk) 11:27, 8 October 2023 (UTC)
Furthermore librsvg was updated, see ticket T193352 (Update librsvg to ≥2.42.3 (2.44.10) e T265549 (Update librsvg to > 2.44.10), so the page should reflect the update (version, new bugs discovered if any, old bugs resolved if any). --ZandDev (talk) 15:10, 8 October 2023 (UTC)
- Not a
librsvg
issue. IIRC,librsvg
generates the PNG thumbnail, but convert does not setAccess-Control-Allow-Origin: *
, so JavaScript issues a CORS error. The tool senses an error and inserts the angry bug image. Glrx (talk) 16:45, 8 October 2023 (UTC)- @Glrx: Ok I understood that the two thread I have opened deal the same bug. --ZandDev (talk) 20:18, 8 October 2023 (UTC)
- At least now those who wander around here understand the problem and find the active and recent thread about it. However here remains my suggestion to update the page bringing it to the current state of things, for example actual librsvg version. --ZandDev (talk) 20:25, 8 October 2023 (UTC)
- There is this tool, which works and may identify some svg issues, however it doesn't show the same rendering issues I see when I uploaded an .svg to commons. Exobiotic (talk) 19:14, 22 April 2024 (UTC)
- At least now those who wander around here understand the problem and find the active and recent thread about it. However here remains my suggestion to update the page bringing it to the current state of things, for example actual librsvg version. --ZandDev (talk) 20:25, 8 October 2023 (UTC)
- @Glrx: Ok I understood that the two thread I have opened deal the same bug. --ZandDev (talk) 20:18, 8 October 2023 (UTC)