Module talk:Size
Module:Size has been template protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit. |
require('strict')
{{Edit protected}}
As per the new lua feature mentioned at m:Tech/News/2022/42, could require('Module:No globals') be replaced with require('strict') -- WOSlinker (talk) 17:26, 25 October 2022 (UTC)
Issue with P518 parameter
{{Edit request}} While trying to fix Infobox issues with File:Nicolae Grigorescu 035.jpg I noticed the following error being displayed by the Infobox: "Lua error in Module:Size at line 235: attempt to index field 'P518' (a nil value). "
- Note that File:Recueil d'estampes gravees 1771 (1102258).jpg and File:RECUEIL - D'estampes gravées - d'après les tableaux - du Cabinet de - Monseigneur le duc - DE CHOISEUL - par les soins du - Sr Basan - MDCCLXXI - bpt6k1518732h (182 of 280).jpg also have the same issue.
I believe the issue might be traced to this edit that adds P518 functionality but has a TODO in its implementation. That's about as far as my familiarity with this system takes me. Could someone take a look at this? I'm guessing this is one of the few images whose Wikidata entry uses P518. But as a result, the Infobox is broken.
Thanks, --Stux (talk) 13:57, 13 March 2026 (UTC)
- @Marsupium: Please fix or revert. There are hundreds of files with script errors. --Geohakkeri (talk) 06:58, 18 March 2026 (UTC)
- I've reverted the edit for now. Thanks. Mike Peel (talk) 08:03, 20 March 2026 (UTC)
- Thanks for revering this @Mike Peel. --Stux (talk) 10:23, 20 March 2026 (UTC)
- Thanks all of you! And sorry for the hassle! I should have tested the edit better! --Marsupium (talk) 16:50, 23 March 2026 (UTC)
- Stupid small bug which should be fixed with this change. --Marsupium (talk) 18:29, 23 March 2026 (UTC)
- Thanks for revering this @Mike Peel. --Stux (talk) 10:23, 20 March 2026 (UTC)
- I've reverted the edit for now. Thanks. Mike Peel (talk) 08:03, 20 March 2026 (UTC)
UPDATE: The new "fix" still causes issues: Category:Pages with script errors now has 100+ errors instead of 400. It would be ideal if the feature change could be debugged properly before implementing but I can see the catch-22 where these errors wouldn't be caught until after they get added to the category. Is there a better way to prevent this issue? --Stux (talk) 15:59, 29 March 2026 (UTC)
- I'm sorry, I have hopefully fixed this other issue and I have refreshed the category. I had been pushed a bit to publish the quickly assembled change at Template talk:Artwork#Dimensions. Not an excuse, but that's why. Sorry for the errors. I hope that it should be finally fine now. --Marsupium (talk) 16:35, 29 March 2026 (UTC)
- Thank you very much Marsupium for responding quickly to this and fixing the cause of the issue! The category seems to only have 6 images at the time of writing and it's already been two days since your fix! So it looks like this issue should be resolved for good. Thanks again! --Stux (talk) 21:38, 31 March 2026 (UTC)