Page MenuHomePhabricator

Search Result contains thumbnails with size:0
Closed, ResolvedPublic0.5 Estimated Story Points

Description

Context

curl 'https://en.wikipedia.beta.wmflabs.org/w/rest.php/coredev/v0/search/page?q=Math' | jq

Produces an output where thumbnails representation in JSON contains size: 0.

{
     "id": 147702,
     "key": "MathML",
     "title": "MathML",
     "excerpt": "following integer sequence: \u007f'&quot;`UNIQ--post<span class=\"searchmatch\">Math</span>-00000001-QINU`&quot;'\u007f or (often, in modern usage): \u007f'&quot;`UNIQ--post<span class=\"searchmatch\">Math</span>-00000002-QINU`&quot;'\u007f Template:OEIS. By definition",
     "description": null,
     "thumbnail": {
       "mimetype": "image/svg+xml",
       "size": 0,
       "width": 200,
       "height": 126,
       "duration": null,
       "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/FibonacciBlocks.svg/200px-FibonacciBlocks.svg.png"
     }
   },

Expected result

  • Size shouldn't be 0 for a valid thumbnail. It should be either a real size of the file or null.

Event Timeline

Change 594997 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/extensions/PageImages@master] rest: Verify that file exists before calling filesize

https://gerrit.wikimedia.org/r/594997

Change 594997 merged by jenkins-bot:
[mediawiki/extensions/PageImages@master] rest: Verify that file exists before calling filesize

https://gerrit.wikimedia.org/r/594997

Peter.ovchyn set the point value for this task to 0.5.May 11 2020, 10:23 AM