Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 428797

Summary: [IE] Missing i18n module wrecks the UI in Internet Explorer
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, simon_kaegi
Version: 5.0Flags: simon_kaegi: review+
ken_walker: review+
Target Milestone: 5.0 RC3   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=404494
Whiteboard:

Description Mark Macdonald CLA 2014-02-21 14:48:06 EST
To observe this problem, you need to have cached plugin data in your localStorage, that refers to a message bundle that does not exist. I've created a localStorage script that puts you in the problematic state (see below).

Using IE 10:
1. Open an Orion page
2. Press F12, then switch to the developer console.
3. Paste the following code into the input area, then click "Run Script":

var origin = window.location.protocol + "//" + window.location.host ;
localStorage['orion/messageBundle/cloudoe/nls/messages'] = '{"Applications": "Applications","Error: ${0}": "Error: ${0}","NoResponseFromServer": "Noresponsefromserverfor${0}.Checkyourinternetconnectionandtryagain.","ServerError": "Servererror: ${0}returned${1}${2}","_expires": 1383243193148}';
localStorage['plugin.' + origin + '/code/cloudoe/plugins/cFPlugin.html'] = '{ "created": 1380643884608, "headers": { "name": "CloudFoundry", "version": "1.0", "description": "ThispluginintegrateswithCloudFoundry.", "login": "' + origin + '/code/cloudoe/plugins/ApplicationEditor.html" }, "services": [ { "serviceId": "0", "names": [ "orion.page.link" ], "methods": [ ], "properties": { "id": "cloudoe.applications", "nameKey": "Applications", "nls": "cloudoe/nls/messages", "uriTemplate": "{+OrionHome}/cloudoe/applications/applications.html" } } ], "autostart": "lazy", "lastModified": 1383242188131 }';

Now load the Orion page again. You will observe the entire Orion nav menu is missing. It fails to render because a runtime error was caused by the missing module when we attempted to lookup the nls bundle. 

Other browsers do not have this problem.
Comment 1 Mark Macdonald CLA 2014-02-21 14:59:35 EST
It appears that require-level errbacks are completely broken in IE. The issue here is in i18nUtil, where we have this code (which I added to fix bug 404494):

> require([ messageBundle ], successCallback, failureCallback);

In Internet Explorer, when messageBundle gives a 404, successCallback is invoked. The expected behavior is to invoke failureCallback, which every other browser I tried does correctly.