Troubleshooting

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.


Troubleshooting

  1. The "XML request error: Internal Server Error (500)" error message is shown when clicking the "Browse Server" button in the image and link dialogs. What is wrong?
  2. I'm not able to upload big files (+200Kb) using the ASP Connector? How to fix it?
  3. When putting the editor in a hidden DIV on Gecko, the editor stops working. How can I solve it?
  4. I'm getting a Syntax Error for the Class keyword when trying to use FCKeditor with ASP. What is causing this?
  5. Why do I get a "Page Cannot Be Displayed" error wherever I place the code to start the editor?
  6. Internet Explorer complains of a JavaScript error and no toolbar shows. Why?
  7. The Built In File Browser causes my IIS to stall/hang.
  8. With ASP.NET, I'm having a "Cannot execute code in freed script" JavaScript error.
  9. After configuring Speller Pages, Internet Explorer gives strange script errors.
  10. Firefox was not loading my toolbars if I used the default set, but it was working for basic.
  11. Security warning when using toolbar or context menu cut/copy/paste commands. How to enable them to work properly?
  12. Blank popups (e.g. from Source button) with Gecko browsers (!SeaMonkey, Firefox, ...)
  13. The toolbar doesn't load in Firefox and I get an error message in the console: this.DOMDocument has no properties
  14. The editor's content is empty when submitting the editor's surrounding form by ajax. What is wrong?
  15. The editor's content is empty inside an ASP.NET AJAX UpdatePanel
  16. There is just an empty Field, when JavaScript is disabled. What is wrong?
  17. With ASP.NET, I need to submit twice when using the RequiredFieldValidator in a FCKeditor instance
  18. Strange attribute named "ilo-full-src" on images when working with Firefox
  19. The panels containing font styles, size, color etc are incorrectly positioned when they appear in Firefox
  20. The showborders option isn't working on IE so that tables with border=0 are invisible in the edit window


The "XML request error: Internal Server Error (500)" error message is shown when clicking the "Browse Server" button in the image and link dialogs. What is wrong?

You probably don't have the correct "Connector" for your server language set in the fckconfig.js file. By default, it uses the ASP connector. For more info about it, please click here.

Or you have a not correct configuration of parameter ConfigUserFilesPath = "/folder_for_userfiles/" in the config.asp file located in the folder \FCKeditor\editor\filemanager\browser\default\connectors\asp

For CF MX6+ you must also have an application.cfm with a <cfapplication name="blah"> tag somewhere above FCKeditor so that application variables are enabled. FCK requires that.

I'm not able to upload big files (+200Kb) using the ASP Connector? How to fix it?

IIS6.0 prevents the upload of files bigger than +200Kb. So you need to make some changes in the default IIS settings first.

Background: For IIS6.0 users, the AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Content-Length header is present and specifies an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS returns a 403 error response.

This property is related in function to MaxRequestEntityAllowed, but is specific to ASP request. Whereas you might set the MaxRequestEntityAllowed property to 1 MB at the general World Wide Web Publishing Service (WWW Service) level, you may choose to set AspMaxRequestEntityAllowed to a lower value, if you know that your specific ASP applications handle a smaller amount of data.

Solution: Open your metabase.XML which is located in c:\Windows\System32\Inetsrv find the line "AspMaxRequestEntityAllowed" and change it to "1073741824". This is 1GB - of course you can enter another value to suite your needs.

When putting the editor in a hidden DIV on Gecko, the editor stops working. How can I solve it?

This is a Gecko specific bug. A sample workaround can be found in the "_testcases" folder. Take a look at the "004.html" file.You just need to "re-enable" the editing when you make the DIV visible.

Edited by Alexander Kerkum - May 31, 2006

You can use this function to enable/disable all fckeditors in a given div:

if (!document.all) {switchEditors(document.getElementById("div_id_here"),"on");}
function switchEditors(oNode,sType)
{
var i=0;
for (i=0;i<oNode.childNodes.length;i++)
{
childNode = oNode.childNodes.item(i);
editor = FCKeditorAPI.GetInstance(childNode.name);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG)
{
editor.EditorDocument.designMode = sType;
}
switchEditors(childNode,sType);
}
}

Edited by Ian Sullivan - 8/11/05

This doesn't seem to work anymore. If I open 004.html, hide, and then show the editor I can't edit. A thread in the forums noted that hiding the iframe causes Geko to turn off designMode so you just need to turn it back on when you make it visible.

if (!document.all){ //Check for Gecko
var editor = FCKeditorAPI.GetInstance(kArticleRTE);
//This test is probably overcautious, but since
//EditorDocument isn't available with an accessor
//it could disappear in a future release.
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG){
editor.EditorDocument.designMode = "on";
}
}

Edited by Colin Ramsay - 15/08/2005

We managed to solve this issue. Firstly make sure the code which hides your div is *not* attached to the onload event. I put it inline after the FCKEditor. Secondly, when you go to show the editor again, do something like this:

function designModeOn(){
var editor = FCKeditorAPI.GetInstance('FCKeditor1');
editor.EditorDocument.designMode = "on";
}
function hide(){
var container = document.getElementById('container');
container.style.display = 'none'
}
function show(){
var container = document.getElementById('container');
container.style.display = 'block';
}
function doShow(){
show();
hide();
show();
designModeOn();
}
doShow();

In other words, show it, then hide it, then show it again. Then activate design mode.

Update by Christian Springub - 22 may 2006

These solutions works only under FireFox. I found the same problem also in Internet Explorer. In this browser when you show your hidden div you can write text in editor but you can't format it. I modified the first code and this is the effect:

function switchEditors(oNode) {
var i=0;
for (i=0;i<oNode.childNodes.length;i++) {
childNode = oNode.childNodes.item(i);
editor = FCKeditorAPI.GetInstance(childNode.name);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
editor.SwitchEditMode();
editor.SwitchEditMode();
}
switchEditors(childNode);
}
}

and in the function which shows your div put this command:

switchEditors(document.getElementById('id of div'));

This function simply turn editor in source-code mode and then come back into design mode.

Added by Wojciech Małota ( CMS ) - 24 Jun 2006

I couldn't get the above working. Childnode.name wasn't working. I think Childnode.id might have. Anyway, I recoded it using prototype.js wizardry. It works for me. Haven't tested in IE yet though.

function switchEditors() {
$$('textarea').each(function(ta) {
editor = FCKeditorAPI.GetInstance(ta.id);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
editor.SwitchEditMode()
editor.SwitchEditMode()
}
})
}

Added by Matt C - 27 Jun 2006

This is the answer for Matt's text.

I've tested my code in latest release versions of IE, Opera and FireFox and there is no problem. The only one thing I found is that there is an error if script shows a hidden div (and executes the function which enables the editor) before the FCKEditor is loaded. I present here the solution of this bug. I hope all people will understand how it works so I don't have to describe it.

var FCKeditorLoaded = false;
function FCKeditor_OnComplete(editorInstance) {
FCKeditorLoaded = true;
}
function switchEditors(ID) {
if(!FCKeditorLoaded) {
setTimeout('switchEditors(\'' + ID + '\')', 500);
return;
}
DoSwitchEditors(document.getElementById(ID));
}
function DoSwitchEditors(oNode) {
var i;
for (i = 0; i < oNode.childNodes.length;i++) {
childNode = oNode.childNodes.item(i);
editor = FCKeditorAPI.GetInstance(childNode.name);
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
editor.SwitchEditMode();
editor.SwitchEditMode();
}
DoSwitchEditors(childNode);
}
}

To start the work you need to execute this:

switchEditors('id of element');

Added by Wojciech Małota ( CMS ) - 28 Jun 2006

The problem seems to be solved in FCK Version 2.3 and Firefox 1.5.0.3. In Firefox Version 1.03 the problem exists furthermore.

Added by Luis Rocha ( ludwig_von_rocht@yahoo.com ) - 20 Mar 2007

am using the latest version of FCK on Firefox 2.0 on both Mac and Windows Vista, the problem appears on both, but not on IE7. The editors are in a hidden div and when I get to a step in the application process it shows the editors' div, but when I click on the editor field it doesn't receive focus. What I do is hit the Source button twice and it allows me to focus after that.

I'm getting a Syntax Error for the Class keyword when trying to use FCKeditor with ASP. What is causing this?

I'm getting a Syntax Error for the Class keyword when trying to use FCKeditor with ASP. What is causing this?

Make sure that the include statement for the fckeditor.asp file is before all other code on your page. If you are using the editor on another included page, make sure the fckeditor.asp include is at the top of the parent page.

Why do I get a "Page Cannot Be Displayed" error wherever I place the code to start the editor?

This can be caused because your code is not pointing the editor to the directory where the editor core (the main JavaScript file of the editor) has been installed on your server.

By default, the editor is configured to work in the "FCKeditor" folder at you web site root. You can easily change it by setting the BasePath property in your code when creating an instance of the editor. This is a sample code for ASP:

<%
oFCKeditor.BasePath = "/fckeditor/"
%>

Internet Explorer complains of a JavaScript error and no toolbar shows. Why?

Possibly check in your configuration file fckconfig.js for errors. The custom toolbar setting line labeled FCKConfig.ToolbarSets[ "Default" ] is a common place to have an error. An extra comma is the most probable problem.

FCKConfig.ToolbarSets["Default"] = [
['Source','-','Save','NewPage','Preview'],
...
['Style','FontFormat','FontName','FontSize'],
] ;

Should be:

FCKConfig.ToolbarSets["Default"] = [
['Source','-','Save','NewPage','Preview'],
...
['Style','FontFormat','FontName','FontSize']
] ;

The Built In File Browser causes my IIS to stall/hang.

If you are developing a project on a server with McAfee Antivirus software running, chances are good that the problem lies in part with the antivirus software. Try disabling ScriptStopper. ScriptStopper is trying to protect your computer from malicious scripts that will access your file system. Do not forget to re-enable ScriptStopper once you are finished.

For information on enabling/disabling ScriptStopper, see your help files or McAfee's online documentation.

This same problem *may* be true for Norton Antivirus, but I have not tested with that.

With ASP.Net, I'm having a "Cannot execute code in freed script" JavaScript error.

Try to turn off SmartNavigation.

After configuring Speller Pages, Internet Explorer gives strange script errors.

Make sure your server is not running PHP in safe mode. The Speller Pages spell checker needs to be able to run the shell_exec() PHP function, which is disabled in safe mode.

Firefox was not loading my toolbars if I used the default set, but it was working for basic.

I found that there were certain buttons that caused problems Style, Font Format/Size/Face, Text Color/BGColor.

I finally figured out that this had to do with the mime type that my server was sending, so I added the following line to my .htaccess:

AddType text/xml .xml

This resolved the problem of displaying, but it turned out that was only part of the problem. It turned out that after I got the toolbars displayed, that FCKeditor never fully loaded - the progress bar was stuck almost all the way done and my memory usage was increasing slowly.

I resolved this problem with the following in my .htaccess file:

<FilesMatch "\.html$">
ForceType none
</FilesMatch>
<FilesMatch "\.htm$">
ForceType none
</FilesMatch>

Like a lot of webmasters, I'm doing some funky stuff with mod_rewrite, parsing html as php, etc. It turned out that the things I was doing in my root directory were not compatible with FCKeditor.

In the end, this is what my /FCKeditor/.htaccess file looks like:

AddType application/x-javascript .js
AddType text/css .css
AddType text/xml .xml
<FilesMatch "\.html$">
ForceType none
</FilesMatch>
<FilesMatch "\.htm$">
ForceType none
</FilesMatch>

The first two lines (having to do with .js and .css) I picked up from the htaccess.txt file as a troubleshooting step.

Security warning when using toolbar or context menu cut/copy/paste commands. How to enable them to work properly?

Firefox has very rigid security features that blocks script based application, like FCKeditor, to have access to the computer clipboard. So, when using this browser, it is quite common to see a warning like the following when clicking in the “Cut” button on the toolbar:

"Your browser security settings don’t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X)"

There are ways to configure Firefox, granting the necessary permissions to FCKeditor to make pasting operations. Detailed info can be found here: http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard

To make the configurations easy and very intuitive (integrated with the FCKeditor interface), I recommend the following extension: http://allowclipboard.foxinus.cz/

Blank popups (e.g. from Source button) with Gecko browsers (!SeaMonkey, Firefox, ...)

It must have been some extension which set the preference capability.policy.default.Window.resizeTo to the value noAccess. The preference does not appear in about:config, so it's even harder to detect. I found it by going through prefs.js (located in the folder of the respective profile).

The toolbar doesn't load in Firefox and I get an error message in the console: this.DOMDocument has no properties

This problem is usually due to your server doesn't returning the proper MIME type for the .xml files (fck_styles.xml). You can verify that removing the styles combo from the toolbar and loading again the editor (after clearing the cache) fixes the problem.

The problem can be due to different reasons at the server side:

  • Mime type not configured for .xml files, can be solved in Apache by putting a .htaccess file into the base directory with the following:
Addtype text/xml .xml
  • Restriction to use .xml files due to security concerns. You'll need to set up another extension as text/xml and use that or use a dinamic page with the proper content type.

NOTE: It should be better if the editor was coded to handle this error and show a warning message instead of silently failing.

The editor's content is empty when submitting the editor's surrounding form by ajax. What is wrong?

This problem is caused by a missing call of the function FCK.UpdateLinkedField(). By submitting the editor's surrounding form with an ajax function the values of all form elements are collected in a javascript object (some kind of an array). At this time the value of the hidden field that usually contains the editor's html output is empty, because the editor's surrounding form wasn't submitted for real, you can call it a simulated submit. The workaround is to call the FCK.UpdateLinkedField() function before submitting the form. Either you call it directly before the ajax collect function or in the onClick attribute of the submit button. For general use, even if you have more than one FCKeditor instance, I wrote the following hack to solve the problem.

// Some Class
function MyClass()
{
this.UpdateEditorFormValue = function()
{
for ( i = 0; i < parent.frames.length; ++i )
if ( parent.frames[i].FCK )
parent.frames[i].FCK.UpdateLinkedField();
}
}
// instantiate the class
var MyObject = new MyClass();

Now can call this method in the onSubmit attribute of the editor's surrounding form before calling the ajax collecting function:

<form ... onSubmit="MyObject.UpdateEditorFormValue(); Ajax.Collect(); return false;">

NOTE: the previous syntax won't work if using VisualStudio 2005 and Atlas and IE. It will be ok to use:

<form ... onSubmit="MyObject.UpdateEditorFormValue(); return true;">

Or you'll do it in the onClick attribute of the submit button, which is also called before the onSubmit event: <input type="submit" ... onClick="MyObject.UpdateEditorFormValue();" /> Edited by heiligkind ( hollo@heiligkind.de ) 17 August 2006

A german version can be found at: http://blog.heiligkind.de/category/nutzliches/

The editor's content is empty inside an ASP.NET AJAX UpdatePanel

If you have trouble getting FCKeditor's '.Value' inside an ASP.NET AJAX UpdatePanel try registering your submit button for a full postback.

Declaratively:

<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<FCKeditorV2:FCKeditor id="Editor1" BasePath="~/Resources/FCKeditor/" runat="server" />
<asp:Button runat="server" Text="Button1" OnClick="Button1_click"></asp:Button>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>

Or in CodeBehind:

protected void Page_Load(object sender, EventArgs e) {
ScriptManager1.RegisterPostBackControl(Button1);
}

There is just an empty Field, when JavaScript is disabled. What is wrong?

This problem is caused by a missing fallback implementation in the PHP method FCKeditor::createHTML(). Even if JavaScript is disabled this function returns an output to display the FCKeditor's IFrame, which only works if JavaScript is enabled. Infact you're not able to get information in PHP if JavaScript is enabled or not, so we have to do a little workaround for a fallback by using the good old [noscript] tag. To keep the FCKeditor's files updatable, it's recommanded to extend the main class. And this is, how it works:

// include FCKeditor's main class
require_once 'fckeditor/fckeditor.php';
/**
* extended class MyFCKeditor
*/
class MyFCKeditor extends FCKeditor
{
/**
* returns the Editor's HTML output
*/
public function returnEditor()
{
// create plaintext, if JavaScript is disabled
// replace <br>/<br /> by "\n"
$noscript_value = str_replace( '<br>', "\n", $this->Value );
$noscript_value = str_replace( '<br />', "\n", $this->Value );
// remove all tags (could be HTML content)
$noscript_value = strip_tags( $noscript_value );
// remove tabs (probably createt by HTML formatting)
$noscript_value = str_replace( "\t", "", $noscript_value );
// set the width of the textarea
$noscript_width = strpos( $this->Width, '%' ) ? $this->Width : $this->Width . 'px';
// create return string
$returner = '<script langauge="JavaScript1.2" type="text/javascript">';
// JavaScript is enabled
$returner .= "document.write('";
// "\n" entfernen, da sonst ein JavaScript Fehler entsteht
$returner .= str_replace( "\n", "", $this->CreateHtml() );
$returner .= "');</script>";
// JavaScript is disabled
$returner .= '<noscript>';
$returner .= '<textarea name="' . $this->InstanceName . '" ';
$returner .= 'style="width:' . $noscript_width . ';';
$returner .= 'height:' . $this->Height . 'px;">';
$returner .= $noscript_value . '</textarea>';
$returner .= '</noscript>';
// return
return $returner;
}
}
// Initialize a new editor instance
$editor = new MyFCKeditor();
$editor->Height = '100';
$editor->Width = '100%'
$editor->Value = '<strong>Hallo, das ist ein dicker Text!</strong>';
// print the editor's code
echo $editor->returnEditor();

Now, if JavaScript is enabled the FCKeditor is displayed as usual, otherwie ther will be a textarea.

Edited by heiligkind ( hollo@heiligkind.de ) 17 August 2006

A german version can be found at:http://blog.heiligkind.de/category/nutzliches/

With ASP.NET, I need to submit twice when using the RequiredFieldValidator in a FCKeditor instance

FCKeditor will not work properly with the Required Field Validator when the "EnableClientScript" property of the validator is set to "true" (default). Due to a limitation in the default validation system, you must set it to "false".

If you want to do client side validation, you must use a Custom Validator instead and provide the appropriate validation function, using the FCKeditor JavaScript API.

Strange attribute named "ilo-full-src" on images when working with Firefox

It may happen if you have the "ImgLikeOpera" extension installed. Just disable it and everything will work fine.

The panels containing font styles, size, color etc are incorrectly positioned when they appear in Firefox

Try wrapping your <textarea></textarea> tags in a div with position set to 'relative'. Like so:

<div style="position: relative;"><textarea id="myTextArea"></textarea></div>

The showborders option isn't working on IE so that tables with border=0 are invisible in the edit window

IE support for this option is provided via a .htc behavior. On my server, however, the mime-type for .htc files was not set correctly and so IE was not using them (see the Microsoft Knowledge Base article at http://support.microsoft.com/kb/306231). Adding the line:

AddType text/x-component .htc

to my .htaccess file resolved this problem.