﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2700	Problem with document.domain automatic fix script asp.net c#	nikolaos		"I am developing a project using FCKEditor.
The project was on http://newweb.[mysite].com since it is not ready
to be on www.[mysite].com
The quick uload image was working while testing on localhost, but when on the onine test site, had a problem. Although it was uploading the image, it would stop on the Upload Tab showing the progress bar dots.

After a lot of tests I realized that something was not working well at the document.domain automatic fix script in SendFileUploadResponse function on FileWorkerBase.cs 

I added some alerts at the catch(e) events to understand what was going on, but with no success

finally I tried to remove this thinh and it worked!

This is what I did:

protected void SendFileUploadResponse( int errorNumber, bool isQuickUpload, string fileUrl, string fileName, string customMsg )
{
	Response.Clear();

	Response.Write( ""<script type=\""text/javascript\"">"" );

	// Minified version of the document.domain automatic fix script.
	// The original script can be found at _dev/domain_fix_template.js
        // Response.Write( @""(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"" );

       if ( isQuickUpload )
               // Response.Write( ""window.parent.OnUploadCompleted("" + errorNumber + "",'"" + fileUrl.Replace( ""'"", ""\\'"" ) + ""','"" + fileName.Replace( ""'"", ""\\'"" ) + ""','"" + customMsg.Replace( ""'"", ""\\'"" ) + ""') ;"" );
                Response.Write(""try {window.parent.OnUploadCompleted("" + errorNumber.ToString() + "",'"" + ResolveUrl(fileUrl.Replace(""'"", ""\\'"")) + ""','"" + fileName.Replace(""'"", ""\\'"") + ""','"" + customMsg.Replace(""'"", ""\\'"") + ""') ;}catch(e) {alert('problem3:' + e.name + ', ' + e.message);}"");
           
            else
				Response.Write( ""window.parent.frames['frmUpload'].OnUploadCompleted("" + errorNumber + "",'"" + fileName.Replace( ""'"", ""\\'"" ) + ""') ;"" );

			Response.Write( ""</script>"" );

			Response.End();
		}
"	Bug	closed	Low		Server : ASP.Net	FCKeditor 2.6.3	duplicate	HasPatch	
