Module talk:Main page image: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(8 intermediate revisions by 5 users not shown)
Line 48:
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? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 04:3032, 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. ---&nbsp;[[User talk:Coffeeandcrumbs|<span style="color:blue;">C</span>]]&amp;[[Special:Contributions/Coffeeandcrumbs|<span style="color:#663366;">C</span>&nbsp;(]][[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 --> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[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)