High volume error, mostly impacting Hebrew Wikipedia possibly due to a local gadget there. With 1200 errors in the last 24hr periods this is now one of our top 10 errors (suggested priority: high
https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.11.15/clienterror/?id=AXXOQoTZBpCrxDVRLeoa
My read of the error is that when this occurs the language list will not be compacted.
The code does not appear to be sufficiently defensive and does not consider the situation where unexpected links are adding to the portlet. I would thus recommend applying an array filter to avoid this error.
return Array.prototype.map.call( document.querySelectorAll( '#p-lang [class*="badge"]' ), function ( el ) { return mw.uls.convertMediaWikiLanguageCodeToULS( el.querySelector( '.interlanguage-link-target' ).lang ); } );
Stack trace:
at <anonymous>:67:752 at Array.CompactInterlanguageList.getLangsWithBadges <anonymous>:67:593 at CompactInterlanguageList.compact <anonymous>:66:950 at CompactInterlanguageList.getCompactList <anonymous>:66:330 at CompactInterlanguageList.init <anonymous>:63:834 at HTMLDocument.createCompactList <anonymous>:69:197 at mightThrow URL1:49:149 at process URL1:49:808 URL1: https://he.wikipedia.org/w/load.php?lang=he&modules=jquery%7Cjquery.ui&skin=vector&version=1pc1u