U4-5111 - 7.1.4 JavaScript runtime error: 'UmbClientMgr' is undefined

Created by Lucas Chasteen 19 Jun 2014, 14:43:13 Updated by Shannon Deminick 24 Jul 2014, 22:10:22

On a clean NuGet install, the following error is displayed when navigating to the back office with Internet Explorer 10:

Unhandled exception at line 33, column 5 in http://xxx/umbraco/Application?umb__rnd=4802716a

0x800a1391 - JavaScript runtime error: 'UmbClientMgr' is undefined

Comments

Sebastiaan Janssen 19 Jun 2014, 14:47:21

Did you build the project in Visual Studio? Is this related to U4-5110?


Lucas Chasteen 19 Jun 2014, 16:08:32

This is a blank MVC project with the 7.1.4 nuget packages added in Visual Studio 2012 running on local IIS Express/SQL Express.

I've also seen this when compiling from source (7.1.4/7.1.5).

This is not related to U4-5110, as it happens even with the whitespace removed.

I looked into debugging it and found that changing the following in LazyLoad.js prevents the problem: e={async:h.createElement("script").async===true}; to e=false;

It appears to be an issue with LazyLoad not properly loading the scripts before trying to set the path in UmbClientMgr, my execution breaks at setUmbracoPath in the following: ], function () { //we need to set the legacy UmbClientMgr path UmbClientMgr.setUmbracoPath('/umbraco');

jQuery(document).ready(function () {
    angular.bootstrap(document, ['umbraco']);
});

});

I should note that this does not occur in Chrome or Firefox.

I looked into this a little further this morning and found a more IE-specific fix: if (isCSS || (env.async || (env.gecko || env.opera))) { to if (isCSS || ((env.async && !env.ie) || (env.gecko || env.opera))) {


Wesley de Roo 26 Jun 2014, 09:39:01

We have also encounterd this issue, only in IE 10. Mostly a refresh will show the login screen.

Error in console: Script5009: 'UmbClientMgr' is undefined Application, line 2 character 1845

/umbraco/Application?umb__rnd=905943149

UmbClientMgr.setUmbracoPath('/umbraco');jQuery(document).ready(function(){angular.bootstrap(document,['umbraco']);});});

Where and how did you applied the fix?


Gert De Ceuster 02 Jul 2014, 09:34:22

I also have encounterd this issue in IE 10. Is there a fix planned or Like Wesley I would like to know how to apply a fix? I think this is a major show stopper. Thanks


Gert De Ceuster 02 Jul 2014, 10:04:50

This error already occured in version 7.1.2


Lucas Chasteen 07 Jul 2014, 15:12:24

I've been away from the office for a bit, so forgive the late reply.

The fix I've found to work involves the following:

In /umbraco/lib/lazyload/lazyload.min.js, find the following if condition: if(o||e.async||e.gecko||e.opera) Change to: if(o||(e.async && !e.ie)||e.gecko||e.opera)

This appears to force IE to load the scripts before trying to use UmbClientMgr. I'm not sure this is the best fix, but it works fine on my end, hopefully someone with stronger JS knowledge can help chime in.


Wesley de Roo 07 Jul 2014, 15:32:12

He Lucas, thnx for replying and your fix!


Gert De Ceuster 07 Jul 2014, 15:52:26

Thank you very much Lucas!


Edwin van Koppen 14 Jul 2014, 06:56:59

@Sebastiaan, can it be included in 7.1.5?


Shannon Deminick 22 Jul 2014, 17:21:42

PR is here: https://github.com/umbraco/Umbraco-CMS/pull/427


Sebastiaan Janssen 22 Jul 2014, 17:32:41

@Shandem I'd go with the official fix: https://github.com/rgrove/lazyload/pull/16


Sebastiaan Janssen 22 Jul 2014, 17:35:11

Could any of you test the latest version of the lib in IE10 in Umbraco so we know that it's fixed? https://github.com/rgrove/lazyload/raw/master/lazyload.js

Make sure to update the version in ClientDependency.config and to thoroughly clear browser cache so that you can definitively say it works (I don't have an IE10 at hand at the moment).


Lucas Chasteen 22 Jul 2014, 17:59:44

I've tried the latest version of the lazyload.js lib, confirmed the correct script pulled, and it worked fine.


Shannon Deminick 24 Jul 2014, 22:10:19

Great thx, i've updated the js file that we ship with to the latest one on github.


Priority: Major

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions:

Due in version: 7.1.5

Sprint:

Story Points:

Cycle: