Fixes for EPiServer Composer client script issues in Internet Explorer and Firefox

From dropIT blog

In my current EPiServer project (using EPiServer CMS R2 SP2 and EPiServer Composer) I discovered a bunch of client script issues which basically made it impossible to use Composer in any web browser. This post describes these issues, how to fix them and make it possible to use Composer in the latest versions of Internet Explorer and Firefox.

Problems in Internet Explorer

  • Script error “Extension.Client not found” when saving content function data in Internet Explorer 7 and 8.
  • Not possible to create functions in Internet Explorer 8 standard mode. Error message when dragging functions to page.

Both of these problems are related to how the setAttribute method of the DOMElement is handled in Internet Explorer. The solution is to pass an empty string as value instead of null.


Add the following code to Dropit\Plugin\Extension\UI\Js\Utils.js

[code lang=”javascript”]
Util.HandleNulls = function(val) {
    return (val == null || val == “null”) ? “” : val;
Locate the function Extension.ContentFunction.prototype.ToXml in Dropit\Plugin\Extension\UI\Js\Extension.ContentFunction.js

Replace line 444:

[code lang=”javascript”]
contentFunctionNode.setAttribute(“remotesite”, this.RemoteSite);
with this code:
[code lang=”javascript”]
contentFunctionNode.setAttribute(“remotesite”, Util.HandleNulls(this.RemoteSite));
Locate the function Extension.ContentArea.prototype.HandleCategoryItem in Dropit\Plugin\Extension\UI\Js\Extension.ContentArea.js

Replace lines 354 and 355:

[code lang=”javascript”]
div.setAttribute(“pid”, pid);
div.setAttribute(“wid”, wid);
With this code:

[code lang=”javascript”]
div.setAttribute(“pid”, Util.HandleNulls(pid));
div.setAttribute(“wid”, Util.HandleNulls(wid));

Problem in Firefox 3.5

Drag and drop doesn’t work. Nothing happens when you drag a function from the toolbox.


This turned out to be solved. You can read more about it in this thread on EPiServer World. Simply replace your Rico.js file with this one: