Last modified: 2014-02-26 18:21:27 UTC
If a stub template includes an image size declaration that includes "px" then that image is shown at native resolution in the editor. This was observed with [[Template:Cornwall-stub]] which originally had the code: {{asbox | image = Flag of Cornwall.svg | pix = 30px | subject = [[Cornwall]] | category = Cornwall stubs | name = Template:Cornwall-stub }} When the "pix" parameter was changed to just "30" [https://en.wikipedia.org/w/index.php?title=Template:Cornwall-stub&diff=564819917&oldid=547286019] as was used by e.g. [[Template:Nigeria-stub]] the image size was displayed correctly. The icon has been rendering at correct size when rendered for reading, presumably since [https://en.wikipedia.org/w/index.php?title=Template:Cornwall-stub&diff=next&oldid=235904748 2009]. Interestingly it renders as intended in VE when the template is initially placed, but does on every subsequent time it's opened in VE. Feel free to use [[User:Thryduulf/stubtemplate]] for testing (I'll leave it up at least until this bug is closed) as I have altered the actual Cornwall-stub template.
I've just been pointed to an older discussion about this issue at https://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback/Archive_2013_07#Problem_with_image_and_other_information_in_an_infobox
*** Bug 51845 has been marked as a duplicate of this bug. ***
This happens on every infobox that uses https://de.wikipedia.org/wiki/Datei:Kazakhstan_location_map.svg e.g. https://de.wikipedia.org/wiki/Balqasch?veaction=edit Im seeing it on _some_ other SVG based location maps on German Wikipedia, but not many (1 in 15?) https://de.wikipedia.org/wiki/Almaty?veaction=edit https://de.wikipedia.org/wiki/Bosporus?veaction=edit Other similar issues https://de.wikipedia.org/wiki/Totes_Meer?veaction=edit https://de.wikipedia.org/wiki/Zittauer_Gebirge?veaction=edit
*** Bug 51826 has been marked as a duplicate of this bug. ***
We are supporting localized option patterns. In this case we get something like $1px, which does not match 30pxpx. We need to investigate why this works in the PHP parser, but not in Parsoid.
*** Bug 54371 has been marked as a duplicate of this bug. ***
Another concrete example: http://parsoid.wmflabs.org/arwiki/%D9%85%D8%B7%D8%A7%D8%B1_%D8%B3%D9%8A%D8%B3%D9%8A%D9%85%D9%8A%D9%88%D8%AA?oldid=11661406 This bug increases a little bit the size of the offline dumps. I have estimated for example that on arwiki, ~200 pictures (calls) are impacted. It seems that the PHP related code is the function parseWidthParam() in Parser.php (but this doesn't seems to support things lik "$1px".
Yes, 'pxpx' is actually a "feature". See bug 13500. Working on a fix...
(In reply to C. Scott Ananian from comment #8) > Yes, 'pxpx' is actually a "feature". See bug 13500. groan!
Change 114345 had a related patch set uploaded by Cscott: Support trailing 'pxpx' in image size options. https://gerrit.wikimedia.org/r/114345
Change 114345 merged by jenkins-bot: Support trailing 'pxpx' in image size options. https://gerrit.wikimedia.org/r/114345