Page MenuHomePhabricator

jquery.i18n causes JavaScript error in IE 8 ('default' is a reserved keyword)
Closed, ResolvedPublic

Description

It seems that once more, we have JS modules deployed by default that make use of reserved keywords of es3, that trip up IE8.

We should unbreak this. Also time to consider dropping IE8 JS support all together perhaps ? (now tracked as T118303). The last number I found showed a usage of 1.28% for IE8.

Event Timeline

TheDJ raised the priority of this task from to High.
TheDJ updated the task description. (Show Details)
TheDJ subscribed.

One of the reasons:

resources/lib/jquery.i18n/src/jquery.i18n.js: line 49, col 29, Extending prototype of native object: 'String'.

resources/lib/jquery.i18n/src/jquery.i18n.language.js: line 470, col 9, Expected an identifier and instead saw 'default' (a reserved word).

2 errors

The above is most likely the cause of: "Expected identifier, string or number" error and probably causing the biggest fail situation right now. Parser errors usually are.. It's pretty much at the ent of that JS file, so hopefully it's the only parsing problem.

Additionally I have Log: Exception in module-execute in module ext.centralNotice.startUp: TypeError: Object doesn't support this action. TypeError: Object doesn't support this action.

I'm not sure if that is actually fatal, or caught by an exception handler or something. I have trouble pinpointing it to a line in the source so far.

This quite possibly is also affecting 1.26. We should check.

ext.visualEditor.standalone, requires jquery.i18n, and is the only module that currently depends on this library it seems. The problem does however carry over to 1.26.

Do we fix this upstream and pull a new version into master and backport that to 1.26 ?

So.. what's the plan to unbreak production right now ?

Change 252770 had a related patch set uploaded (by TheDJ):
Unbreak IE8

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

Change 252771 had a related patch set uploaded (by Krinkle):
Unbreak IE8

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

Krinkle renamed this task from Multiple ES5 keyword issues in default core modules break IE8 JS execution to jquery.i18n causes JavaScript error in IE 8 ('default' is a reserved keyword).Nov 12 2015, 9:06 PM

I have released jquery.i18n v1.0.4. I do not know if anyone updated core or VE. ULS is also not yet updated.

Change 254298 had a related patch set uploaded (by TheDJ):
Unbreak IE8

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

Change 254344 had a related patch set uploaded (by Jforrester):
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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

Change 252770 abandoned by Jforrester:
Unbreak IE8

Reason:
Done 'properly' as I8db627c54.

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

Change 254298 abandoned by Jforrester:
Unbreak IE8

Reason:
Done 'properly' as I8db627c54.

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

Change 254344 merged by jenkins-bot:
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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

Change 254349 had a related patch set uploaded (by Catrope):
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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

Change 254351 had a related patch set uploaded (by Jforrester):
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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

Change 254349 merged by jenkins-bot:
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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

Change 254351 merged by jenkins-bot:
resources: Upgrade jquery.i18n from 1.0.3 to 1.0.4

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