Template talk:InvalidSVG

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

Visibility (appearance)

[edit]

IMHO the appearance of the W3C boxes is sometimes too dominant. The validity is an essential but a rather less important property of a drawing, well suited for category diffusion. When used together with the tool boxes, I would like it more when the boxes were as decent as the tool boxes, and I like to discuss it with others whether/how we should alter that.
I am thinking about boxes like

 The source code of this SVG is valid.
 The source code of this SVG is invalid because of 13 errors.

(with one single thin red upstroke through the W3C icon letters)

How about that? sarang사랑 08:51, 7 November 2014 (UTC)[reply]

Essential and less important are mutually exclusive. Not all errors reported by the validator are critical/essential/whatever, but it's hard to judge: Will all SVG-tools (not only the librsvg version currently used here) tolerate a reported error, or does it break the SVG for some purposes outside of commons? Checking the number of errors and flipping {{InvalidSVG}} to {{ValidSVG}} is easy, fixing errors is hard:
  1. Download invalid SVG, tackle it with a text editor or some wannabe-"optimizer" (hoping for a valid result), upload to the validator to check the new version, and upload to commons if the new version is okay.
  2. Ditto for a protected SVG, parking the valid dupe somewhere, and try {{editprotected|technical=yes}} hoping for an admin to get this right.
  3. A protected invalid SVG with a valid SVG already existing elsewhere (some wannabe-"opti" dupe) is the worst case, because some admins do not understand that valid in fact is essential, while the readability of a simple SVG is less important as long as that erroneously protected SVG is invalid.
Disclaimer, for an invalid complex SVG some effort to fix this SVG manually instead of replacing it with valid "opti"-cruft could be justified. I like the red colour of the current template. Your suggestion is less obtrusive, but maybe a crossed-out W3C instead of only a single stroke would be clearer? –Be..anyone (talk) 11:35, 10 November 2014 (UTC)[reply]
I agree with Be..anyone that warning about invalidity is important. If we accept to distribute invalid files, the least we can do is to prominently warn users. However, I also agree with sarang that the current design draws too much much attention to valid files. Validity should be the norm; it does not justify such emphasis.
Note that as can be seen in the "Showcase" section below, this now offers 2 versions, one of which is way less prominent (similar to sarang's proposal). --Chealer (talk), 11 October 2024

Parameter ss=1 crashes validator

[edit]

Example: File:Scallop Diagram2.svg (5.91MB) "sometimes" (= now) works only without "show source". –Be..anyone (talk) 23:18, 20 January 2015 (UTC) copy + paste from {{ValidSVG}}. 23:20, 20 January 2015 (UTC)[reply]

Discussed on the valid SVG variant together with other validator link option issues in older sections. –Be..anyone (talk) 07:12, 5 February 2015 (UTC)[reply]

✓ Fixed for the now valid example above. –Be..anyone (talk) 07:14, 5 February 2015 (UTC)[reply]

Missing dotty

[edit]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Chealer (talk) 01:17, 11 October 2024 (UTC)

Can we add a dot to this template as well, after the word "invalid"? Compare the twins:

 
W3C-validity not checked.

{{Editprotected}} This comment was added by Palosirkka on 2018-01-31 and then tweaked by Chealer.

✓ Done Thank you! -- User: Perhelion 16:29, 31 January 2018 (UTC)[reply]

Showcase/tests

[edit]

This section created by sarang merely showcases this template. It should be moved to the documentation page. --Chealer (talk) 01:17, 11 October 2024 (UTC)[reply]

Big boxes
Small boxes
 
The source code of this SVG is invalid.
 
The source code of this SVG is invalid due to an error.
 
The source code of this SVG is invalid due to 2 errors.
 
The source code of this SVG is invalid due to 22 errors.
 
The source code of this SVG is invalid due to 222 errors.
 
The source code of this SVG is invalid due to 2222 errors.
 
The source code of this SVG is uncheckable.

Large file size

[edit]
Big boxes
Small boxes
 
The source code of this large SVG is invalid.
 
The source code of this large SVG is invalid due to an error.
 
The source code of this large SVG is invalid due to 2 errors.
 
The source code of this large SVG is invalid due to 222 errors.
 
The source code of this large SVG is invalid due to 2222 errors.
 
The source code of this large SVG is uncheckable.

Difference with {{Invalid SVG}}

[edit]

This section was moved here by User:sarang from his Talk page (on 15 May 2020). --Chealer (talk) 00:28, 11 October 2024 (UTC)[reply]


Hello!

Why do we have both {{InvalidSVG}} and {{Invalid SVG}}? User:Jonteemil 02:54, 7 May 2020 (UTC)[reply]

It's historic, not a solution to be happy about; InvalidSVG is an inbetween-"template" which gets the parameters and decides whether to join the 'valid' or the 'invalid' branch. Every other solution would be better but now it is much too late to change something, it is used 16K times... With the valid/invalid processing there are more other odd things you may wonder about. A great part is my fault, I started to care about this theme ten years ago when I had no real knowledge in writing templates. Many other faults result from that time, and now we have to deal with illogical solutions which are used many thousands times – too often that it would make sense to rework it, and with too complicated parameters that it could be done easier. Examples for that are HandSVG, SimplSVG, and some more. -- sarang♥사랑 08:55, 7 May 2020 (UTC) (rectified by Chealer)

Deprecate? This can show a file as "valid"!

[edit]

As strange as this may seem, this template actually calls either {{Invalid SVG}} or {{Valid SVG}}! So if it's called with err set to 0, it can display a green box indicating that a file is valid.

This makes the documentation incorrect, and makes this whole maze even more cryptic.

As sarang wrote in the previous section, getting rid of this template would be difficult, but can we at least agree to mark this template as deprecated? --Chealer (talk) 02:24, 11 October 2024 (UTC)[reply]

 Strong support for discarding this template in some way. Unfortunately I am busy with other stuff on this wiki and several other wikis. Taylor 49 (talk) 15:53, 11 October 2024 (UTC)[reply]
[edit]

The links generated by {{Invalid SVG}} or {{Valid SVG}} (and therefore this template) to the W3C Markup Validation Service are effectively broken. While they technically work (they yield a valid page and a 200 status), they report "External Checker not available" due to an HTTP 429 Too Many Requests error. This might not happen every time, but it has visibly happened for more than 1 week (judging from ticket #1715 Error Code 429 - too many requests, about half a year).

Considering the lack of progress from the W3C, I recommend making these links point to a Wikimedia validator. Chealer (talk) 23:50, 11 October 2024 (UTC)[reply]

 Strong support Last time when I tried a "validator" it was inherently broken (probably it was the one of W3C). Where is the Wikimedia validator? Taylor 49 (talk) 06:50, 13 October 2024 (UTC)[reply]

Indeed, validator.w3.org has been overloaded for months, being unusable most of the time, forcing us to use the non-dtd version instead, which cannot detect certain errors.
Initially, completely deactivating the link, or making it available only to logged users, would help in the diagnosis
Kontributor 2K (talk) 10:22, 13 October 2024 (UTC)[reply]