Page MenuHomePhabricator

Intl is not available., Object doesn't support this action at frb.formatCurrency Unknown script code:1240:13
Closed, ResolvedPublic

Description

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.10.13/clienterror/?id=AXUiNMKk2lgCwKx71jkO

at frb.formatCurrency  Unknown script code:1240:13
at Anonymous function  Unknown script code:1528:17
at each  URL1:4:985
at jQuery.prototype.each  URL1:2:989
at frb.localizeAmountOptions  Unknown script code:1518:5
at Anonymous function  Unknown script code:1921:5
at mightThrow  URL1:49:132
at Anonymous function  URL1:49:808

URL1: https://fr.wikipedia.org/w/load.php?lang=fr&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=dyoed

Error also shows up as Intl is not available.
https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.10.13/clienterror/?id=AXUiNMB6LNRtRo5XE8Fs

 	at frb.formatCurrency  Unknown script code:1240:13
at Anonymous function  Unknown script code:1656:9
at mightThrow  https://fr.wikipedia.org/w/load.php?lang=fr&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=dyoed:49:132
at Anonymous function  https://fr.wikipedia.org/w/load.php?lang=fr&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=dyoed:49:80

Event Timeline

Jdlrobson renamed this task from Object doesn't support this action at frb.formatCurrency Unknown script code:1240:13 to Intl is not available., Object doesn't support this action at frb.formatCurrency Unknown script code:1240:13.Oct 13 2020, 8:01 PM
Jdlrobson updated the task description. (Show Details)

@Pcoombe any idea which banner could be responsible for this one?

Pretty much every fundraising banner uses Intl through one of the transcluded JS templates (meta:MediaWiki:FundraisingBanners/LocalizeJS…). This does perform a feature test, through. But it looks like IE broke the spec and unintentionally allowed the Intl object to exist even if the underlying localisation information from the operating system is not in working condition. Per https://stackoverflow.com/a/55487063/319266 and msdn, it seems this is limited to IE 11 when used on a specific (broken) patch release version of Windows 8.1 (kb4489881).

Several other open source projects (such as Angular) have run into a similar issue and switched from a conditional check to a try-catch. I see that @Pcoombe has begun experimenting with that last week, at https://meta.wikimedia.org/wiki/MediaWiki:Centralnotice-template-pcoombe_T265396.

Pcoombe claimed this task.

Okay, should be fixed now with this change to the shared LocalizeJS code. @Krinkle was right about the issue and fix, I was just struggling a bit with it causing further errors in IE. Turns out I just needed to include an exception variable for the catch statement.