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 created this task.Nov 10 2015, 1:29 PM
TheDJ updated the task description. (Show Details)
TheDJ raised the priority of this task from to High.
TheDJ added a subscriber: TheDJ.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 10 2015, 1:29 PM
Legoktm set Security to None.
Legoktm added a subscriber: Legoktm.
TheDJ added a comment.Nov 10 2015, 6:40 PM

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
TheDJ added a comment.Nov 10 2015, 6:48 PM

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.

TheDJ updated the task description. (Show Details)Nov 10 2015, 6:56 PM

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

TheDJ added a comment.Nov 10 2015, 7:57 PM

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 ?

Was also reported at T117849.

Isarra moved this task from Backlog to Bugs on the MediaWiki-Interface board.Nov 10 2015, 10:26 PM
TheDJ added a comment.Nov 11 2015, 4:40 PM

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

Change 252771 merged by jenkins-bot:
Unbreak IE8

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

demon moved this task from Backlog to To be fixed on the MW-1.26-release board.Nov 16 2015, 6:46 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

Jdforrester-WMF closed this task as Resolved.Nov 20 2015, 2:43 AM
Jdforrester-WMF removed a project: Patch-For-Review.
demon moved this task from To be fixed to Done on the MW-1.26-release board.Nov 20 2015, 7:10 PM