Friday, October 21, 2011

Javascript error in Episerver CMS 5/R2

I noticed an error in the XHTML-editor. When adding a picture in the editor and try to see the image properties I get a javascript error.

SCRIPT5007: Unable to get value of the property 'specified': object is null or undefined
HyperlinkImageProperties.js, line 262 character 4


To solve this problem, navigate to the folder EPiServer\CMS\ 5.2.375.7\application\util\Editor\javascript


Open HyperlinkImageProperties.js and edit the following things:

  • First change is at line 262: if(!widthAttr.specified)
    Change it to: if(widthAttr == null)
  • Second change is at line 282: if(!heightAttr.specified)
    Change it to: if(heightAttr == null)

Then open HyperlinkProperties.js and edit these lines:

  • First change is at line 292: if(!widthAttr.specified)
    Change it to: if(widthAttr == null)
  • Second change is at line 316: if(!heightAttr.specified)
    Change it to: if(heightAttr == null)