Issue 1: mobile-html on zhwiki
While researching the parent issue, I noticed that the action=mobileview request did not provide a value for thumbwidth.
which returns:
{ "error": { "code": "badinteger", "info": "Invalid value \"\" for integer parameter \"thumbwidth\".", "docref": "See https://zh.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes." } }
Issue 2: mobile-sections of File pages
The other issue detected in the code was in mobile-sections output:
Example URL: http://localhost:8888/commons.wikimedia.org/v1/page/mobile-sections/File:The%20Golden%20Gate%20Bridge%20and%20Comet%20C2020%20F3%20NEOWISE%20and.jpg
The "imageinfo" property was not showing thumburl, thumbwidth, and thumbheight.
Actual
"imageinfo": { "url": "https://upload.wikimedia.org/wikipedia/commons/8/85/The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg", "descriptionurl": "https://commons.wikimedia.org/wiki/File:The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg", "descriptionshorturl": "https://commons.wikimedia.org/w/index.php?curid=92180852" },
Expected
"imageinfo": { "thumburl": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg/800px-The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg", "thumbwidth": 800, "thumbheight": 533, "url": "https://upload.wikimedia.org/wikipedia/commons/8/85/The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg", "descriptionurl": "https://commons.wikimedia.org/wiki/File:The_Golden_Gate_Bridge_and_Comet_C2020_F3_NEOWISE_and.jpg", "descriptionshorturl": "https://commons.wikimedia.org/w/index.php?curid=92180852" },