Page MenuHomePhabricator

Argument 2 passed to App\OOUI\TranslationsFieldset::getField() must be of the type string, null given
Closed, ResolvedPublic3 Story Points

Description

Value proposition:

Fix the error (below) to prevent the tool from breaking or catch it gracefully.

Seen in production log:

[2019-03-25 05:41:52] request.CRITICAL: Uncaught PHP Exception TypeError: "Argument 2 passed to App\OOUI\TranslationsFieldset::getField() must be of the type string, null given, called in /mnt/nfs/labstore-secondary-tools-project/svgtranslate/app/src/OOUI/TranslationsFieldset.php on line 31" at /mnt/nfs/labstore-secondary-tools-project/svgtranslate/app/src/OOUI/TranslationsFieldset.php line 54

Event Timeline

MaxSem created this task.Mar 25 2019, 8:36 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 25 2019, 8:36 PM
Niharika updated the task description. (Show Details)Mar 26 2019, 11:47 PM
Niharika triaged this task as Normal priority.
Niharika set the point value for this task to 3.
MaxSem claimed this task.Apr 1 2019, 11:18 PM
MaxSem moved this task from Ready to In Development on the Community-Tech-Sprint board.

@MaxSem This can't really be QA-ed. Can you resolve this if the error is gone? Thanks.

We'll need to deploy the fix and wait a bit - should we remove the ticket from the sprint board meanwhile?

@MaxSem We can keep it on the board so we don't forget about it entirely. And let's deploy it!

dom_walden added a subscriber: dom_walden.EditedApr 9 2019, 3:15 PM

This error has been reported in https://meta.wikimedia.org/wiki/Talk:Community_Tech/SVG_translation#500:_Internal_Server_Error. So, I uploaded the file that caused the error to beta commons and tried to load it in svgtranslate-test:
https://tools.wmflabs.org/svgtranslate-test/File:Anatomy_of_the_Human_Ear-pa.svg

For me (on Firefox and Chromium), only the top half of the image loads.

@MaxSem Please check if this is the case for you and whether it is related to this change. Otherwise, I'll raise a separate bug.

The https://tools.wmflabs.org/svgtranslate-test/api/file/Anatomy_of_the_Human_Ear-pa.svg/fallback.png image appears to have been cropped.

For me (on Firefox and Chromium), only the top half of the image loads.

That sounds like T219335: SVG Translate loading images halfway through. :(

I have not seen this error for the image from T219227#5097672, nor for any of the 40+ images I have tested as part of other work.

Moving this on.

I've just released 0.8.0, containing code relating to this task.

Niharika closed this task as Resolved.Apr 18 2019, 8:32 PM
Niharika moved this task from Product sign-off to Done on the Community-Tech-Sprint board.
Niharika moved this task from Backlog to Done on the SVG Translate Tool board.Tue, Apr 30, 6:47 PM