Page MenuHomePhabricator

svgcheck tool doesn't display rendered image if filename includes spaces
Closed, ResolvedPublic

Description

The WMFlabs SVG Checker is supposed to display a rendered version of the SVG so the user can make sure the file will be rendered correctly when uploaded to Wikimedia proper. Instead, all I get is the blank checker board pattern.

The old Toolserve SVG checker (http://toolserver.org/~jarry/svgcheck/stable/index.php) works fine, so the problem has something to do with the migration.


Version: unspecified
Severity: normal
OS: Windows 7
Platform: PC

Details

Reference
bz59969

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:40 AM
bzimport set Reference to bz59969.

Can you please add a URL that fails?

Okay, let's start again: I'm Tim. I have never used "SVG Checker", I don't know how it should behave, how it actually behaves on Toolserver and how on Tools.

Given that, could you describe the problem in a way so I can reproduce it? Thanks!

(In reply to comment #3)

Okay, let's start again: I'm Tim. I have never used "SVG Checker", I don't
know how it should behave, how it actually behaves on Toolserver and how on
Tools.

Given that, could you describe the problem in a way so I can reproduce it?
Thanks!

Oh, I'm sorry! I thought you meant URLs of files that didn't work. I didn't realize I needed to list the URL of the tool!

Both versions of the SVG Checker are provided as links at http://commons.wikimedia.org/wiki/Commons:SVG_Check

Steps to reproduce:

  1. Pick any one of the files I mentioned, or any other valid SVG file, and download it to your computer.
  2. Go the above page and the link at the top.
  3. Upload the SVG file in step 1, and click the button to submit.

Expected results:
A PNG version of the SVG should be rendered and displayed in the next page, on top of a checkerboard background to indicate transparency.

Actual results:
A checkerboard pattern is displayed by itself.


To see how it is supposed to work, follow the above steps, but click the link at the bottom of the page. That will take you to the toolserver version.

trlkly: Why did you move this from the product "Tool Labs tools > other" to "Wikimedia Labs > tools infrastructure"?

jarry1250: Note to the maintainer of this tool: A generic link to https://bugzilla.wikimedia.org/enter_bug.cgi?product=Tool%20Labs%20tools on http://tools.wmflabs.org/svgcheck/ isn't great, it should also specifically link to a component. See https://www.mediawiki.org/wiki/Bug_management/Project_Maintainers#To_add_a_project_or_component

(In reply to comment #5)

trlkly: Why did you move this from the product "Tool Labs tools > other" to
"Wikimedia Labs > tools infrastructure"?

jarry1250: Note to the maintainer of this tool: A generic link to
https://bugzilla.wikimedia.org/enter_bug.cgi?product=Tool%20Labs%20tools on
http://tools.wmflabs.org/svgcheck/ isn't great, it should also specifically
link to a component. See
https://www.mediawiki.org/wiki/Bug_management/
Project_Maintainers#To_add_a_project_or_component

Because I thought "tool labs" meant the toolserver, so I thought I'd screwed up. If I had it right the first time, feel free to move it back.

I found the categories here quite confusing. I second the recommendation for the bugzilla link to automatically take the user to the proper component.

(In reply to comment #6)>

I found the categories here quite confusing. I second the recommendation for
the bugzilla link to automatically take the user to the proper component.

They are :) Andre, what do you suggest component-wise? We're going to have (have?) > 1000 tools on Tool Labs. Components for each, but only on request? That seems to be the road we're heading down, with all other tools using [Other]. I've moved thus bug accordingly and assigned myself.

I have to say, I can't replicate the problem using the steps in comment #4: I get a perfect rendering of each into PNG. Could other people try, so I get an idea of what the difference between trlkly and my setups is.

If it helps, I've tried using both Firefox and Chrome on Windows 7 and 8. Firefox leaves the image blank, while Chrome actually shows a broken image icon. an example image URL is http://tools.wmflabs.org/svgcheck/permatemp/alpha%20and%20omega.png. If I copy that to the URL bar, I am told the that file exists, but that I am forbidden to access it.

Could this be a permissions issue?

If you browse to http://tools.wmflabs.org/svgcheck/permatemp/uppercase_alpha_and_omega_in_times_new_roman.png , what do you get? I can see that file. (It'll be deleted at some point, but hopefully not before you're able to test.)

(In reply to comment #9)

If you browse to
http://tools.wmflabs.org/svgcheck/permatemp/
uppercase_alpha_and_omega_in_times_new_roman.png
, what do you get? I can see that file. (It'll be deleted at some point, but
hopefully not before you're able to test.)

I also see that file. Perhaps the problem has something to do with spaces? My versions of all those files I linked above have spaces in the filename. (Wikimedia converts them to underscores.)

I went and checked a file that doesn't have spaces on my end, either, and it worked fine. https://commons.wikimedia.org/wiki/File:Cache,basic.svg

So, yeah, I'd say the problem has to do with spaces. Maybe convert them to underscores like Wikimedia normally does.

Just a thought that came to me: while you are at it, maybe also sanitize the string for other punctuation. I note that apostrophes tend to cause problems, too, even with the old SVG checker.

(In reply to comment #7)

(In reply to comment #6)>

I found the categories here quite confusing. I second the recommendation for
the bugzilla link to automatically take the user to the proper component.

They are :) Andre, what do you suggest component-wise? We're going to have
(have?) > 1000 tools on Tool Labs. Components for each, but only on request?
That seems to be the road we're heading down, with all other tools using
[Other]. I've moved thus bug accordingly and assigned myself.
[...]

Sidetracking this bug (and not being Andre :-)): Not all tools are developed on Gerrit/Bugzilla, some prefer GitHub, others will have an on-wiki presence where bugs and feature requests are reported, etc., so not all 1000 tools will need a component here. I think "components on request" is a useful way to deal with that as long as Andre isn't overwhelmed.

RESOLVED FIXED, with a more intelligent process for resolving characters such as apostrophes.

(In reply to Jarry1250 from comment #7)

(In reply to comment #6)>

I found the categories here quite confusing. I second the recommendation for
the bugzilla link to automatically take the user to the proper component.

They are :) Andre, what do you suggest component-wise? We're going to have
(have?) > 1000 tools on Tool Labs. Components for each, but only on request?

The problem is the same for extensions - Bugzilla component can be requested (see https://www.mediawiki.org/wiki/Bug_management/Project_Maintainers#To_add_a_project_or_component ) but if a maintainer of a tool would not like to use Bugzilla or prefers a different place for tracking bug reports and feature requests, then there is no sense in making people report an issue in Bugzilla where the developerwill not see it. :)