Page MenuHomePhabricator

Error: Collection contains more than one element
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error

MediaWiki version: n/a

message
Error: Collection contains more than one element

at OO.ui.Element.static.unsafeInfuse URL1:289:902
at OO.ui.Element.static.infuse URL1:289:545
at OO.ui.infuse URL1:286:29
at infuseSelectAllToHeader URL1:1:263
at URL1:2:260
at fire URL1:159:198
at fireWith URL1:160:391
at fire URL1:634:436
at URL1:651:1585
at mightThrow URL1:162:141
at resolve/</process< URL1:162:800

URL1: https://de.wikipedia.org/w/load.php?lang=de&modules=ext.GlobalPreferences.global%7Cext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.cx.eventlogging.campaigns%7Cext.echo.api%2Cinit%7Cext.eventLogging%2CnavigationTiming%2Cpopups%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Cinterface%2Cpreferences%2Cwebfonts%7Cjquery%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.client%2Ccookie%2ClengthLimit%2CtextSelection%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cexperiments%2Chtmlform%2CjqueryMsg%2Clanguage%2Cnotification%2Cstorage%2Cuser%2Cutil%2CvisibleTimeout%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.htmlform.ooui%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.notification.convertmessagebox%7Cmediawiki.page.ready%7Cmediawiki.special.preferences.ooui%7Cmediawiki.ui.button%7Cmediawiki.widgets.CheckMatrixWidget%2CSelectWithInputWidget%2CTitlesMultiselectWidget%2CUsersMultiselectWidget%2CvisibleLengthLimit%7Coojs-ui-widgets.icons%7Coojs-ui.styles.icons-content%7Cskins.vector.legacy.js%7Cuser.defaults&skin=vector&version=q1nq5

Impact

Notes

Details

Request URL
n/a

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle updated the task description. (Show Details)

I'm guessing the theory is that ext.GlobalPreferences.global, whilst merely one of hundreds of modules loaded in that batch, stands out because from a Codesearch we see that it is only rarely loaded on pages (specifically, Special:GlobalPreferences). And that on that page, this module is the primary JS code that runs and thus the most likely cause of errors if an error happens on that page.

Without a Logstash URL this is hard to confirm or investigate, but since I spent a few minutes doing the same as you already did, I figured I'd at least record it this time, for CommTech's benefit :)

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-2021.04.14?id=jurC0XgBg_6mGHGhgHIz (it's also got a filter on the board per our new convention)

All error URLs point to the special page.

I'm not sure how to follow up on this, can we get more data on this error?

The only data I have is the errors coming in on logstash.

The error message comes from OOjs UI when unsafeInfuse is called https://gerrit.wikimedia.org/g/mediawiki/core/+/9c74a067c39fa801362b1291baa946ee89e5e51c/resources/lib/ooui/oojs-ui-core.js#721 (which is called when infuse is called on an empty collection)

According to stack trace infuseSelectAllToHeader is to blame which points to https://gerrit.wikimedia.org/g/mediawiki/extensions/GlobalPreferences/+/421d17f9a40b517fe2401643581a5c8740d2aa01/resources/ext.GlobalPreferences.global.js#17

which means $root.find( '.globalprefs-section-select-all' ) is not matching any elements.

Somebody with knowledge of GlobalPreferences should debug why this is happening to understand and fix this bug (I know nothing about this extension).