Content deleted Content added
→wierd problem: sp |
→Protected edit request on 2022 September 8: Responded to edit request |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 42:
::::Strange. Also strange that I cannot reproduce.
::::{{tq|I'm only seeing the image corrupted when width{{=}}154}} Curious: if you manually inspect element Test2 (which isn't broken) to width 154 it breaks? If no, does changing it to 154 in the source break it? If yes to either, how about 150 or 152? [[User:ProcrastinatingReader|ProcrastinatingReader]] ([[User talk:ProcrastinatingReader|talk]]) 20:31, 21 December 2020 (UTC)
:::::{{re|ProcrastinatingReader}} and only at
== Image width calculation for .ogg file results in "-nanpx" ==
This image call is currently on the main page: <code><nowiki>{{main page image/OTD|File:O Canada instrumental 1916.ogg|"O Canada"}}</nowiki></code>. It results in <code><nowiki>[[File:O Canada instrumental 1916.ogg|-nanpx |"O Canada" ]]</nowiki></code>. My suspicion is that the automatic width calculation in this module may be causing this invalid size specification. If so, some error-checking and a default value may be needed here. To verify this, try <code><nowiki>{{#invoke:Main_page_image|width|O Canada instrumental 1916.ogg}}</nowiki></code>; when I do it, the result is <code>-nan</code>. Pinging {{U|MSGJ}}, who made changes to that code most recently. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 01:15, 24 June 2021 (UTC)
:{{Ping|Coffeeandcrumbs}} would you look into this? — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 04:32, 24 June 2021 (UTC)
::{{U|MSGJ}} and {{U|Coffeeandcrumbs}}: This bug still exists in the module. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 00:22, 5 November 2021 (UTC)
:::{{U|ProcrastinatingReader}}, do you have time to look at this? I don't see a visible error in [[Wikipedia:Main Page history/2021 June 24|the archived version]] but <code>-nan</code> is in the source code. --- [[User talk:Coffeeandcrumbs|<span style="color:blue;">C</span>]]&[[Special:Contributions/Coffeeandcrumbs|<span style="color:#663366;">C</span> (]][[User:Coffeeandcrumbs|Coffeeandcrumbs]]) 02:39, 5 November 2021 (UTC)
::::This is happening again at [[:Template:Did you know nominations/Boy Scouts of America (march)]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 06:20, 29 January 2022 (UTC)
== Protected edit request on 4 November 2021 ==
{{edit fully-protected|Module:Main page image|answered=yes}}
Please copy change [[Special:Diff/1053614141]] from the samdbox to this template. It resolves the issues seen at [[Template:Main page image/DYK/testcases]] where a red Lua error appears if the image parameter is removed. [[User:GKFX]]<sup>[[User talk:GKFX|talk]]</sup> 23:32, 4 November 2021 (UTC)
:{{done}}<!-- Template:EP --> — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 05:59, 5 November 2021 (UTC)
== Protected edit request on 2022 September 8 ==
{{edit fully-protected|answered=yes}}
The formula on line 16 appears to be convoluted? It seems to be the equivalent of <code>math.floor(140 * math.sqrt( page.file.width / page.file.height ) + 0.5)</code>, which reads much more simply to me. The new code also makes it obvious to passers-by what exactly this code is trying to do: downsize the image to an area of 19,600 pixels, preserving aspect ratio. Can the formula on line 16 be changed to the requested code above? [[user:theleekycauldron|theleekycauldron]] ([[user talk:theleekycauldron|talk]] • [[Special:Contributions/Theleekycauldron|contribs]]) (she/her) 02:46, 9 September 2022 (UTC)
:{{done}}<!-- Template:EP --> [[User:DatGuy|DatGuy]]<sup>[[User talk:DatGuy|Talk]]</sup><sub>[[Special:Contributions/DatGuy|Contribs]]</sub> 13:42, 9 September 2022 (UTC)
|