Hi,
The editor works fine until I reload the page. Then I get this error. If I shut down the browser and start it again, then it's OK until I reload again. This happens even with the sample apps. Happens in IE and Firefox on Windows, also Firefox on Mac. Can you help?
John
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.host]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.mysite.com/FCKEditor/editor/ ... startup.js :: <TOP_LEVEL> :: line 22" data: no]
Sun, 11/27/2005 - 23:43
#1
RE: exception on page reload
The line of code triggering the NS_ERROR_FAILURE error in fck_startup.js is:
FCKConfig.FullBasePath=document.location.protocol+'//'+document.location.host+FCKConfig.BasePath;
specifically: document.location.host
In Firefox when you refresh a page with the editor the protocol gets changed (for mine it gets changed to "about:" instead of "http:") and when you try to read the host you get the Javascript error. Interestingly, it does not do this in IE.
Still troubleshooting. I'll let you know if I find anything more.
RE: upgrade to fix
In IE 6.0 this issue never occurred.
RE: exception on page reload
Replace (in internals\fckconfig.js):
FCKConfig.FullBasePath = document.location.protocol + '//' + document.location.host + FCKConfig.BasePath ;
With
try
{
FCKConfig.FullBasePath = document.location.protocol + '//' + document.location.host + FCKConfig.BasePath ;
}
catch (e)
{
if (document.location.protocol == 'about:')
document.location.reload();
else
alert('There was an error loading the editor.');
}
This will force a reload of the page which seems to fix the issue for me (Ran into the error testing in Mozilla 1.7.7 Using FckEditor 2.2).
Not sure if the file is the same in the latest version of FckEditor, but I did a quick test to see if the same issue was happening in the latest and it was.