Page MenuHomePhabricator

[BUG] SVGTranslate does not render previews and shows error popup
Open, NormalPublicBug

Description

What is the problem?

SVG Translate complains when applied to a file with subscripted text.

Steps to reproduce problem
  1. https://tools.wmflabs.org/svgtranslate/File:Osmotic_pressure_on_blood_cells_diagram.svg

Expected behavior:
Generates preview.

Observed behavior:
Gives error popup about being unable to generate preview. Reproduced for both files above.

Environment

Operating system: Win10
Browser: Chrome
Wiki(s): Toolforge
Editor, if applicable:

Screenshots (if applicable):

Event Timeline

Glrx created this task.Feb 14 2019, 8:05 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 14 2019, 8:05 PM
Glrx added a comment.Feb 14 2019, 8:06 PM

Should be sub of T215835

@Glrx I do see the popup but I also see the preview rendered fine. Do you see the preview?

Glrx renamed this task from [BUG] ... SVGTranslate complains that is is unable to display preview to [BUG] ... SVGTranslate complains that it is unable to display preview.Feb 14 2019, 8:08 PM
Glrx added a comment.EditedFeb 14 2019, 8:11 PM

Original SVG preview shows. Changes do not show and trigger another popup.

Make target language fr; English labels still show.

Niharika renamed this task from [BUG] ... SVGTranslate complains that it is unable to display preview to [BUG] SVGTranslate does not render previews and shows error popup.Feb 14 2019, 9:04 PM
Niharika triaged this task as Normal priority.
Niharika updated the task description. (Show Details)Feb 14 2019, 10:58 PM
Glrx added a comment.Feb 14 2019, 11:50 PM

File:999-percentages.svg had issues.

It did not have an XML processing instruction, so MW does not serve it as SVG. I added the PI, and the file now validates with the W3C validatior.

The text elements assert xml:space="preserve" but had extraneous 40px-high whitespace before and after the desired 18px-high text. My guess is that caused the $x substrings to occur. I removed the dubious whitespace. I don't know how to clear the toolforge cache, so I uploaded a copy of the file to File:Test.svg. The file now displays the preview without incident.

All of this suggests problems with tspan processing.

Thanks @Glrx. I'll take that file off the ticket.

Niharika updated the task description. (Show Details)Feb 15 2019, 12:04 AM
MBinder_WMF changed the subtype of this task from "Task" to "Bug Report".Mar 26 2019, 11:04 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptApr 18 2019, 8:46 PM