Page MenuHomePhabricator

[M] Error: All parameters are required and cannot be empty or zero at ThumbnailWidth
Closed, ResolvedPublic

Description

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-2021.03.19?id=YeQlSngBfVMx58vqoG9S

Error: All parameters are required and cannot be empty or zero
at ThumbnailWidth URL1:31:854
at TWCP.calculateWidths URL1:43:478
at C.getLightboxImageWidths URL1:67:143
at C.getCurrentImageWidths URL1:67:531
at MMVP.resize URL1:107:285
at MMVP.setupEventHandlers/< URL1:120:41
at dispatch URL2:204:742
at add/elemData.handle URL2:201:388
at trigger URL2:250:596
at trigger/< URL2:251:572
at each URL2:140:2
at each URL2:138:2
at trigger URL2:251:543
at C.attach/< URL1:63:431
at exec URL1:6:1301

URL1: https://de.wikipedia.org/w/load.php?lang=de&modules=jquery.color%2Cfullscreen%2Cthrottle-debounce%2Ctipsy%7Cmmv&skin=vector&version=16g5o
URL2: https://de.wikipedia.org/w/load.php?lang=de&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.centralautologin%7Cext.cite.ux-enhancements%7Cext.cx.eventlogging.campaigns%7Cext.eventLogging%2CnavigationTiming%2Cpopups%2CwikimediaEvents%7Cext.flaggedRevs.advanced%7Cext.uls.common%2Ccompactlinks%2Cinterface%2Cpreferences%2Cwebfonts%7Cjquery%2Coojs%2Coojs-router%2Csite%7Cjquery.client%2Ccookie%2CtextSelection%7Cjquery.uls.data%7Cmediawiki.String%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Ctoc%2Cuser%2Cutil%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.ui.button%2Cicon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Cskins.vector.legacy.js%7Cuser.defaults&skin=vector&version=brwxb

Event Timeline

CBogen renamed this task from Error: All parameters are required and cannot be empty or zero at ThumbnailWidth to [M] Error: All parameters are required and cannot be empty or zero at ThumbnailWidth.Apr 7 2021, 4:53 PM
AnneT removed AnneT as the assignee of this task.Jun 10 2021, 4:42 PM
AnneT subscribed.

@AnneT since you're no longer working on this, should I move it back to Ready for Development, or has someone else picked it up from you? Thanks!

Hey @CBogen, I don't believe anyone else has picked this up, so I've moved it back to Ready for Development. Sorry for missing that!

Some notes on this so far

So the error is thrown in two places: mmv.model.ThumbnailWidth.js and mmv.model.Thumbnail.js.

ThumbnailWidth is called in mv.ThumbnailWidthCalculator.js in turn called by mmv.lightboxinterface.js

Thumbnail is called by mmv.provider.GuessedThumbnailInfo.js and mmv.provider.ThumbnailInfo.js

My gut tells me that the problems are being created by ThumbnailWidthCalculator.js since calculated width and height values for images with extreme ratios and low resolution can result in outputting 0px due to rounding down with Math.round. Inputs should always be 1px or greater and this should help solve some of the problems such as here.

I suspect though that there are other possible sources of bad data triggering this error here that are much more difficult to replicate consistently. Ticking this one off first is a good first step.

Change 714580 had a related patch set uploaded (by Seddon; author: Seddon):

[mediawiki/extensions/MultimediaViewer@master] Err: param required cant be empty/0 ThumbnailWidth

https://gerrit.wikimedia.org/r/714580

Change 714580 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Err: param required cant be empty/0 ThumbnailWidth

https://gerrit.wikimedia.org/r/714580

Tested on beta commons and no issues seen at the moment and bug seems resolved.

Etonkovidova subscribed.

Checked for wmf.21 - the error is not present.