Now I will start by saying this would be my third Drupal FCKEditor instalation... And first issue along these lines:

Once I install, enable and configure FCKEditor I get an interesting yet perplexing error... All text boxes defined as multi-line text boxes vanish. More pointedly... I can not even fully configure this module because of the glitch.

I think the only way to really give you a concept of what I mean is to show you:

*Someone PLEASE help me regain my sanity... I have been trying to work this out for 5 days with multiple uninstall/reinstall sessions.*

CommentFileSizeAuthor
drupalfckeditorissue.jpg125.54 KBdesign.by.s.l.s.

Comments

wwalc’s picture

Click on the "8 errors" at the bottom of your browser and take a look what Firebug says.
Perhaps some files are missing in your FCKeditor directory (or are broken).

design.by.s.l.s.’s picture

I did check them... But they make absolutely no sense to me at all so:

1. missing ] after element list
[Break on this error] g,/>/g,/\r/g,/\n/g],[''',''','"','=','<','>','',''])+'"';};function _FCK_Protect...
fckeditorcode_gec... (line 30)

I am pretty sure it is near the bottom but this is completely not my area of expertise (HTML and CSS in my sleep)... So??! And wondering why this hasn't been caught by others as it is a fairly common download and is an "as is" error.

var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasFocus:false,AttachToOnSelectionChange:function(A){this.Events.AttachEvent('OnSelectionChange',A);},GetLinkedFieldValue:function(){return this.LinkedField.value;},GetParentForm:function(){return this.LinkedField.form;},StartupValue:'',IsDirty:function(){if (this.EditMode==1) return (this.StartupValue!=this.EditingArea.Textarea.value);else return (this.StartupValue!=this.EditorDocument.body.innerHTML);},ResetIsDirty:function(){if (this.EditMode==1) this.StartupValue=this.EditingArea.Textarea.value;else if (this.EditorDocument.body) this.StartupValue=this.EditorDocument.body.innerHTML;},StartEditor:function(){this.TempBaseTag=FCKConfig.BaseHref.length>0?'<base href="../../fckeditor/editor/js/'+FCKConfig.BaseHref+'" _fcktemp="true"></base>':'';var A=FCK.KeystrokeHandler=new FCKKeystrokeHandler();A.OnKeystroke=_FCK_KeystrokeHandler_OnKeystroke;A.SetKeystrokes(FCKConfig.Keystrokes);if (FCKBrowserInfo.IsIE7){if ((CTRL+86/*V*/) in A.Keystrokes) A.SetKeystrokes([CTRL+86,true]);if ((SHIFT+45/*INS*/) in A.Keystrokes) A.SetKeystrokes([SHIFT+45,true]);};this.EditingArea=new FCKEditingArea(document.getElementById('xEditingArea'));this.EditingArea.FFSpellChecker=FCKConfig.FirefoxSpellChecker;FCKListsLib.Setup();this.SetHTML(this.GetLinkedFieldValue(),true);},Focus:function(){FCK.EditingArea.Focus();},SetStatus:function(A){this.Status=A;if (A==1){FCKFocusManager.AddWindow(window,true);if (FCKBrowserInfo.IsIE) FCKFocusManager.AddWindow(window.frameElement,true);if (FCKConfig.StartupFocus) FCK.Focus();};this.Events.FireEvent('OnStatusChange',A);},FixBody:function(){var A=FCKConfig.EnterMode;if (A!='p'&&A!='div') return;var B=this.EditorDocument;if (!B) return;var C=B.body;if (!C) return;FCKDomTools.TrimNode(C);var D=C.firstChild;var E;while (D){var F=false;switch (D.nodeType){case 1:if (!FCKListsLib.BlockElements[D.nodeName.toLowerCase()]) F=true;break;case 3:if (E||D.nodeValue.Trim().length>0) F=true;};if (F){var G=D.parentNode;if (!E) E=G.insertBefore(B.createElement(A),D);E.appendChild(G.removeChild(D));D=E.nextSibling;}else{if (E){FCKDomTools.TrimNode(E);E=null;};D=D.nextSibling;}};if (E) FCKDomTools.TrimNode(E);},GetXHTML:function(A){if (FCK.EditMode==1) return FCK.EditingArea.Textarea.value;this.FixBody();var B;var C=FCK.EditorDocument;if (!C) return null;if (FCKConfig.FullPage){B=FCKXHtml.GetXHTML(C.getElementsByTagName('html')[0],true,A);if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) B=FCK.DocTypeDeclaration+'\n'+B;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) B=FCK.XmlDeclaration+'\n'+B;}else{B=FCKXHtml.GetXHTML(C.body,false,A);if (FCKConfig.IgnoreEmptyParagraphValue&&FCKRegexLib.EmptyOutParagraph.test(B)) B='';};B=FCK.ProtectEventsRestore(B);if (FCKBrowserInfo.IsIE) B=B.replace(FCKRegexLib.ToReplace,'$1');return FCKConfig.ProtectedSource.Revert(B);},UpdateLinkedField:function(){FCK.LinkedField.value=FCK.GetXHTML(FCKConfig.FormatOutput);FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');},RegisteredDoubleClickHandlers:{},OnDoubleClick:function(A){var B=FCK.RegisteredDoubleClickHandlers[A.tagName];if (B) B(A);},RegisterDoubleClickHandler:function(A,B){FCK.RegisteredDoubleClickHandlers[B.toUpperCase()]=A;},OnAfterSetHTML:function(){FCKDocumentProcessor.Process(FCK.EditorDocument);FCKUndo.SaveUndoStep();FCK.Events.FireEvent('OnSelectionChange');FCK.Events.FireEvent('OnAfterSetHTML');},ProtectUrls:function(A){A=A.replace(FCKRegexLib.ProtectUrlsA,'$& _fcksavedurl=$1');A=A.replace(FCKRegexLib.ProtectUrlsImg,'$& _fcksavedurl=$1');return A;},ProtectEvents:function(A){return A.replace(FCKRegexLib.TagsWithEvent,_FCK_ProtectEvents_ReplaceTags);},ProtectEventsRestore:function(A){return A.replace(FCKRegexLib.ProtectedEvents,_FCK_ProtectEvents_RestoreEvents);},ProtectTags:function(A){var B=FCKConfig.ProtectedTags;if (FCKBrowserInfo.IsIE) B+=B.length>0?'|ABBR|XML':'ABBR|XML';var C;if (B.length>0){C=new RegExp('<('+B+')(?!\w|:)','gi');A=A.replace(C,'<FCK:$1');C=new RegExp('<\/('+B+')>','gi');A=A.replace(C,'<\/FCK:$1>');};B='META';if (FCKBrowserInfo.IsIE) B+='|HR';C=new RegExp('<(('+B+')(?=\\s|>|/)[\\s\\S]*?)/?>','gi');A=A.replace(C,'<FCK:$1 />');return A;},SetHTML:function(A,B){this.EditingArea.Mode=FCK.EditMode;if (FCK.EditMode==0){A=FCKConfig.ProtectedSource.Protect(A);A=A.replace(FCKRegexLib.InvalidSelfCloseTags,'$1></$2>');A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);if (FCKBrowserInfo.IsGecko){A=A.replace(FCKRegexLib.StrongOpener,'<b$1');A=A.replace(FCKRegexLib.StrongCloser,'<\/b>');A=A.replace(FCKRegexLib.EmOpener,'<i$1');A=A.replace(FCKRegexLib.EmCloser,'<\/i>');};this._ForceResetIsDirty=(B===true);var C='';if (FCKConfig.FullPage){if (!FCKRegexLib.HeadOpener.test(A)){if (!FCKRegexLib.HtmlOpener.test(A)) A='<html dir="'+FCKConfig.ContentLangDirection+'">'+A+'</html>';A=A.replace(FCKRegexLib.HtmlOpener,'$&<head></head>');};FCK.DocTypeDeclaration=A.match(FCKRegexLib.DocTypeTag);if (FCKBrowserInfo.IsIE) C=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C='<link href="../../fckeditor/editor/js/'+FCKConfig.FullBasePath+'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />';C+='<link href="../../fckeditor/editor/js/'+FCKConfig.FullBasePath+'css/fck_internal.css" rel="stylesheet" type="text/css" _fcktemp="true" />';C=A.replace(FCKRegexLib.HeadCloser,C+'$&');if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(A)) C=C.replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);}else{C=FCKConfig.DocType+'<html dir="'+FCKConfig.ContentLangDirection+'"';if (FCKBrowserInfo.IsIE&&!FCKRegexLib.Html4DocType.test(FCKConfig.DocType)) C+=' style="overflow-y: scroll"';C+='><head><title></title>'+_FCK_GetEditorAreaStyleTags()+'<link href="../../fckeditor/editor/js/'+FCKConfig.FullBasePath+'css/fck_internal.css" rel="stylesheet" type="text/css" _fcktemp="true" />';if (FCKBrowserInfo.IsIE) C+=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C+='<link href="../../fckeditor/editor/js/'+FCKConfig.FullBasePath+'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />';C+=FCK.TempBaseTag;var D='<body';if (FCKConfig.BodyId&&FCKConfig.BodyId.length>0) D+=' id="'+FCKConfig.BodyId+'"';if (FCKConfig.BodyClass&&FCKConfig.BodyClass.length>0) D+=' class="'+FCKConfig.BodyClass+'"';C+='</head>'+D+'>';if (FCKBrowserInfo.IsGecko&&(A.length==0||FCKRegexLib.EmptyParagraph.test(A))) C+=GECKO_BOGUS;else C+=A;C+='</body></html>';};this.EditingArea.OnLoad=_FCK_EditingArea_OnLoad;this.EditingArea.Start(C);}else{FCK.EditorWindow=null;FCK.EditorDocument=null;this.EditingArea.OnLoad=null;this.EditingArea.Start(A);this.EditingArea.Textarea._FCKShowContextMenu=true;FCK.EnterKeyHandler=null;if (B) this.ResetIsDirty();FCK.KeystrokeHandler.AttachToElement(this.EditingArea.Textarea);this.EditingArea.Textarea.focus();FCK.Events.FireEvent('OnAfterSetHTML');};if (FCKBrowserInfo.IsGecko) window.onresize();},HasFocus:false,RedirectNamedCommands:{},ExecuteNamedCommand:function(A,B,C){FCKUndo.SaveUndoStep();if (!C&&FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};FCKUndo.SaveUndoStep();},GetNamedCommandState:function(A){try{if (!FCK.EditorDocument.queryCommandEnabled(A)) return -1;else return FCK.EditorDocument.queryCommandState(A)?1:0;}catch (e){return 0;}},GetNamedCommandValue:function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==-1) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';},PasteFromWord:function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');},Preview:function(){var A=FCKConfig.ScreenWidth*0.8;var B=FCKConfig.ScreenHeight*0.7;var C=(FCKConfig.ScreenWidth-A)/2;var D=window.open('',null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+A+',height='+B+',left='+C);var E;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) E=FCK.TempBaseTag+FCK.GetXHTML();else E=FCK.GetXHTML();}else{E=FCKConfig.DocType+'<html dir="'+FCKConfig.ContentLangDirection+'"><head>'+FCK.TempBaseTag+'<title>'+FCKLang.Preview+'</title>'+_FCK_GetEditorAreaStyleTags()+'</head><body>'+FCK.GetXHTML()+'</body></html>';};D.document.write(E);D.document.close();},SwitchEditMode:function(A){var B=(FCK.EditMode==0);var C=FCK.IsDirty();var D;if (B){if (!A&&FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();D=FCK.GetXHTML(FCKConfig.FormatSource);if (D==null) return false;}else D=this.EditingArea.Textarea.value;FCK.EditMode=B?1:0;FCK.SetHTML(D,!C);FCK.Focus();FCKTools.RunFunction(FCK.ToolbarSet.RefreshModeState,FCK.ToolbarSet);return true;},CreateElement:function(A){var e=FCK.EditorDocument.createElement(A);return FCK.InsertElementAndGetIt(e);},InsertElementAndGetIt:function(e){e.setAttribute('FCKTempLabel','true');this.InsertElement(e);var A=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i<A.length;i++){if (A[i].getAttribute('FCKTempLabel')){A[i].removeAttribute('FCKTempLabel');return A[i];}};return null;}};FCK.Events=new FCKEvents(FCK);FCK.GetHTML=FCK.GetXHTML;function _FCK_ProtectEvents_ReplaceTags(A){return A.replace(FCKRegexLib.EventAttributes,_FCK_ProtectEvents_ReplaceEvents);};function _FCK_ProtectEvents_ReplaceEvents(A,B){return ' '+B+'_fckprotectedatt="'+A.ReplaceAll([/&/g,/'/g,/"/g,/=/g,/</g,/>/g,/\r/g,/\n/g],[''',''','"','=','<','>','',''])+'"';};function _FCK_ProtectEvents_RestoreEvents(A,B){return B.ReplaceAll([/'/g,/"/g,/=/g,/</g,/>/g,//g,//g,/'/g],["'",'"','=','<','>','\r','\n','&']);};function

2. FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsGecko )
fckeditor.html (line 182)

// Gecko browsers doens't calculate well that IFRAME size so we must
// recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko )
{
	function Window_OnResize()
	{
		if ( FCKBrowserInfo.IsOpera )
			return ;

		var oCell = document.getElementById( 'xEditingArea' ) ;

		var eInnerElement = oCell.firstChild ;
		if ( eInnerElement )
		{
			eInnerElement.style.height = 0 ;
			eInnerElement.style.height = oCell.scrollHeight - 2 ;
		}
	}
	window.onresize = Window_OnResize ;
}

3. FCKLang is not defined
[Break on this error] window.document.dir = FCKLang.Dir ;
fckeditor.html (line 112)

// Set the editor interface direction.
window.document.dir = FCKLang.Dir ;

4.FCK_ContextMenu_Init is not defined
[Break on this error] FCK_ContextMenu_Init() ;
fckeditor.html (line 104)

// Initialize the editing area context menu.
FCK_ContextMenu_Init() ;

5.FCKConfig_LoadPageConfig is not defined
[Break on this error] FCKConfig_LoadPageConfig() ;
fckeditor.html (line 89)

// Load configurations defined at page level.
FCKConfig_LoadPageConfig() ;

6.FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsIE )
fckeditor.html (line 58)

if ( FCKBrowserInfo.IsIE )
{

7.FCKConfig is not defined
[Break on this error] FCKConfig.DisableEnterKeyHandler = false ;
fckconfig.js (line 28)

// Disable the custom Enter Key Handler. This option will be removed in version 2.5.
FCKConfig.DisableEnterKeyHandler = false ;

8.InitializeAPI is not defined
[Break on this error] InitializeAPI() ;
fckeditor.html (line 123)

window.onload = function()
{
InitializeAPI() ;
wwalc’s picture

When FCKeditor module is launched, some config values are calculated and placed inside source of your page as a javascript code.
I think the problem is that for some reasons invalid javascript statement is created and later all other problems comes from that.

So you can do two things:
- try to replace FCKeditor 2.5 with FCKeditor 2.4.3 (or vice versa) in modules/fckeditor/fckeditor to be sure that broken archive is not a problem here
- take a look at source of your Drupal page (or send me a PM) and look for potential problems in creating FCKeditor instance there

design.by.s.l.s.’s picture

Status: Active » Closed (fixed)

I was using the 2.4.3 with 5.x-1.3-beta... I usually prefer official releases and stable releases but I took it to an alternate about 2 hours because I needed this solved.

I have done a complete removal and reinstall with 5.x-1.x-dev with 2.4.3... All appears to work now. In fact it is flawless as long as you switch the drupal mod over.

I was puzzling over why those were not automatically calculating themselves. I do know a bit of JS but not where I want it to be yet.

Thank you for trying to help.

S

socialnicheguru’s picture

Version: 5.x-1.3-beta » 5.x-2.1

i have the same probelm

i am using
fckeditor-5.x-2.1.tar.gz

I get the same problem for
FCKeditor_2.5.1.tar.gz
or
FCKeditor_2.6.tar.gz

Theme is Garland.

all authenticated users have filtered html as their input choice.

I have the following issue on Firefox 2.0.0.14 on a mac

FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsGecko )
fckeditor.html (line 183)
FCKLang is not defined
[Break on this error] window.document.dir = FCKLang.Dir ;
fckeditor.html (line 117)
FCK_ContextMenu_Init is not defined
[Break on this error] FCK_ContextMenu_Init() ;
fckeditor.html (line 109)
FCKConfig_LoadPageConfig is not defined
[Break on this error] FCKConfig_LoadPageConfig() ;
fckeditor.html (line 94)
FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsIE )
fckeditor.html (line 58)
FCKConfig is not defined
[Break on this error] FCKConfig.CustomConfigurationsPath = '' ;
fckconfig.js (line 27)
FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsGecko )
fckeditor.html (line 183)
FCKLang is not defined
[Break on this error] window.document.dir = FCKLang.Dir ;
fckeditor.html (line 117)
FCK_ContextMenu_Init is not defined
[Break on this error] FCK_ContextMenu_Init() ;
fckeditor.html (line 109)
FCKConfig_LoadPageConfig is not defined
[Break on this error] FCKConfig_LoadPageConfig() ;
fckeditor.html (line 94)
FCKBrowserInfo is not defined
[Break on this error] if ( FCKBrowserInfo.IsIE )
fckeditor.html (line 58)
FCKConfig is not defined
[Break on this error] FCKConfig.CustomConfigurationsPath = '' ;
fckconfig.js (line 27)
InitializeAPI is not defined
[Break on this error] InitializeAPI() ;
fckeditor.html (line 124)
InitializeAPI is not defined
[Break on this error] InitializeAPI() ;

Help please.

socialnicheguru’s picture

I am still having this problem. it is frustrating.

When I enter the informaiton it shows up just as you would expect- the html is rendered. But when I display on the page all i get it is the html sytax.

any help

Chris

wwalc’s picture

Does it happen only on Mac? Did you unpack all files to the correct directory: http://drupal.fckeditor.net/troubleshooting#4
Is there a chance to see it live?
It looks like editor\fckeditor.html is in the correct place but js/fckeditorcode_gecko.js is not loaded for some reasons...
You can install Data Tamper extension for Firefox to view all HTTP requests and check what files are missing (HTTP code 404).