Page MenuHomePhabricator

Uncaught SvgStructureException: structure-error-text-contains-dollar
Open, LowPublicBUG REPORT

Description

Uncaught PHP Exception App\Exception\SvgStructureException: "structure-error-text-contains-dollar" at /data/project/svgtranslate/tool/src/Model/Svg/SvgFile.php line 288

Time: 	

2024-03-04T21:30:34.191049+00:00

Channel: 	

request

Context: 	
exception: 	

{
    "class": "App\\Exception\\SvgStructureException",
    "message": "structure-error-text-contains-dollar",
    "code": 0,
    "file": "/data/project/svgtranslate/tool/src/Model/Svg/SvgFile.php:288",
    "trace": [
        "/data/project/svgtranslate/tool/src/Model/Svg/SvgFile.php:99",
        "/data/project/svgtranslate/tool/src/Service/SvgFileFactory.php:32",
        "/data/project/svgtranslate/tool/src/Controller/ApiController.php:87",
        "/data/project/svgtranslate/tool/vendor/symfony/http-kernel/HttpKernel.php:163",
        "/data/project/svgtranslate/tool/vendor/symfony/http-kernel/HttpKernel.php:75",
        "/data/project/svgtranslate/tool/vendor/symfony/http-kernel/Kernel.php:202",
        "/data/project/svgtranslate/tool/public/index.php:47"
    ]
}

Extra: 	
host: 	

svgtranslate.toolforge.org

uri: 	

https://svgtranslate.toolforge.org/api/translate/Florina_region_in_Greece_geographic_map.svg/el

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Samwilson to help me identify priority, could you elaborate on this bug, how prevalent it is, and its impact on SVG translate?

TheDJ renamed this task from Uncuaght SvgStructureException: structure-error-text-contains-dollar to Uncaught SvgStructureException: structure-error-text-contains-dollar.Mar 25 2024, 10:28 PM

It's pretty rare, and hasn't happened again since I opened this task.

It looks like the erroring file was this version from 05:27, 5 March 2024, and likely edited manually. I'm also not sure how the API fault was triggered, because when using that version of the file and trying to open it for translation via the SVG Translate search form, it correctly displays this error message:

This file contains unsupported text content in text161672-bg ('$1'). SVG Translate is not able to work with the dollar-number syntax.

This task is still valid though, because for some reason we've got different error handling for the API entry point.