Hi all,
I'm doing a bit of triage on a website and I'm trying to fix the FCKEditor. The version installed is 2.6.3 and I'm getting a bunch of JS errors in Firebug when I load pages that use the editor. These are the errors:
I initially thought if I upgrade the editor to 2.6.4 it might help. I overwrote the files in the /Editor/ folder with the latest release and no dice, I still get the same errors. I can always revert back to the old version via SVN so I'm not worried about that. Has anyone experienced this before and/or know how to solve this issue? I'm new to this editor so I'm lost. I'm really trying to avoid actually going into the code for the FCKEditor itself and tinkering around to fix this error. I feel like there's something else I'm missing here.
Any tips/ideas are much appreciated. Thanks in advance!
I'm doing a bit of triage on a website and I'm trying to fix the FCKEditor. The version installed is 2.6.3 and I'm getting a bunch of JS errors in Firebug when I load pages that use the editor. These are the errors:
FCKConfig is undefined
FCKConfig.ProcessHiddenField();
fckedito...r=Default (line 154)
FCKConfig is undefined
FCKConfig.ProcessHiddenField() ;
fckedito...r=Default (line 154)
FCKConfig is undefined
var FCKConfig=FCK.Config={};if (document... A.className+=' '+FCKConfig.BodyClass;};
fckedito..._gecko.js (line 33)
FCKTools is undefined
var FCK_InternalCSS = FCKTools.FixCssU...und-image:url(images/block_h6.png)}' ) ;
fckedito...r=Default (line 176)
FCKLang is not defined
FCK.ContextMenu={};FCK.ContextMenu.Liste...Command(A.Name).Execute(A.CustomData);};
fckedito..._gecko.js (line 105)
FCKLang is not defined
window.document.dir = FCKLang.Dir ;
fckedito...r=Default (line 203)
FCKConfig is undefined
function FCKToolbarSet_Create(A){var B;v...0;i<B.length;i++) B[i].RefreshState();};
fckedito..._gecko.js (line 99)
FCKConfig is undefined
var FCKConfig=FCK.Config={};if (document... A.className+=' '+FCKConfig.BodyClass;};
I initially thought if I upgrade the editor to 2.6.4 it might help. I overwrote the files in the /Editor/ folder with the latest release and no dice, I still get the same errors. I can always revert back to the old version via SVN so I'm not worried about that. Has anyone experienced this before and/or know how to solve this issue? I'm new to this editor so I'm lost. I'm really trying to avoid actually going into the code for the FCKEditor itself and tinkering around to fix this error. I feel like there's something else I'm missing here.
Any tips/ideas are much appreciated. Thanks in advance!

Re: Lots of "undefined" or "not defined" err
http://rene.dalle.ca/EcoTourismePerou/T ... editor.php
<?php session_start(); define('ROOT', '../'); define('LANGUE', 'English'); echo '<?xml version="1.0" encoding="iso-8859-1"?>', '<?xml-stylesheet href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" type="text/css"?>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Test FCKeditor</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="René Dalle" /> <meta name="Keywords" content="WYSIWYG, editor" /> <link type="text/css" media="screen" href="../Css/editor.css" /> <script type="text/javascript" src="../Admin/fckeditor/fckeditor.js"></script> <style type="text/css"> * { font-family: Arial, Tahoma, Verdana, Lucida, Sans-serif; font-size: 10pt; } body { margin-left: 20%; margin-right: 20%; } </style> </head> <body> <form action="../Tests/PostedData.php" method="post" target="_blank"> <div> <h2>Enter text in the area:</h2> <?php define ('LANGUE_CODING', 'fr'); define ('BASE_URL', '/EcoTourismePerou/'); include_once(ROOT .'Admin/Classes/myEditor.class.php') ; $theEditor = new myEditor ( 'FCKeditor') ; $theEditor->Width = 750; $theEditor->Height = 200; $theEditor->ToolbarSet = 'Simple'; $theEditor->Value = ''; $theEditor->Create() ; ?> </div> <br /> <input type="submit" value="Submit" /> </form> </body> </html><?php /** * ------------------------------------------ * A tour agency management package * * @package Eco-Vivencial-Tours * @subpackage Admin functions * @category Classes * * @version 1.0 (PHP 5) * @date 2009-Apr-28 * * @author René Dalle <rene@dalle.ca> * @copyright Copyright © 2009, René DALLE * * ------------------------------------------ * Abstract: extend the FCK editor with my default settings * ------------------------------------------ */ /** * Base class for FCK editor */ include_once(ROOT .'Admin/fckeditor/fckeditor.php') ; /** * 'editor' class Definition */ class myEditor extends FCKeditor { /** * Constructor */ function myEditor ($editorName = 'FCKeditor', $editorSkin = 'Silver') { /** * Instantiate the new editor */ parent::__construct ($editorName); /** * Set up the default settings */ $this->BasePath = BASE_URL .'Admin/fckeditor/' ; $this->Config['BaseHref'] = (isset($_SERVER['SERVER_NAME'])? $_SERVER['SERVER_NAME'] : '') .BASE_URL ; $this->Config["EditorAreaCSS"] = BASE_URL .'Css/editor.css' ; $this->Config["CustomConfigurationsPath"] = BASE_URL .'Admin/Editor/Config.js' ; $this->Config["DefaultLanguage"] = LANGUE_CODING ; $this->Config['DefaultFontFormatLabel'] = 'normal' ; $this->Config['DefaultFontLabel'] = 'Standard Font' ; $this->Config['DefaultFontSizeLabel'] = 'medium' ; $this->Config['DefaultStyleLabel'] = 'Standard Style' ; $this->Config['StylesXmlPath'] = BASE_URL .'Admin/Editor/Styles.xml' ; $this->Config['ImageBrowserURL'] = BASE_URL .'Admin/Editor/ImagesBrowser.php' ; $this->Config['ImageUploadURL'] = BASE_URL .'Admin/Editor/ImagesUploader.php'; $this->Config['FileUploadURL'] = BASE_URL .'Admin/Editor/FileUploader.php'; $this->Config['SkinPath'] = BASE_URL .'Admin/Editor/Skins/' .$editorSkin .'/' ; } } // ------------------ E N D ------------------ ?>// +----------------------------------------------------------------------+ // | WYSIWYG Editor Configuration | // +----------------------------------------------------------------------+ // | Copyright (c) 2009, René DALLE | // +----------------------------------------------------------------------+ // | Authors: René Dalle (RD) <rene@dalle.ca> | // | Update History: | // | Date Author Dexription | // | dd-mmm-yyyy XXX Text... | // +----------------------------------------------------------------------+ // // Editor Options FCKConfig.PreserveSessionOnFileBrowser = true ; // Remove the automatic detection of Language FCKConfig.AutoDetectLanguage = false ; // XHTML Document type FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >' ; // Igmore empty tags FCKConfig.IgnoreEmptyParagraphValue = true ; // Display formatted source FCKConfig.FormatSource = true ; // Set the toulbar to always expanded FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = false; // ToolBar definition FCKConfig.ToolbarSets['myToolBar'] = [ ['Source', 'NewPage', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteWord', '-', 'Undo', 'Redo', '-', 'SpellCheck'], ['Templates'], '/', ['Bold', 'Italic', 'Underline', '-', 'Subscript', 'Superscript'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull'], ['OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', 'Blockquote'], ['Link', 'Unlink'], ['Image', 'Table', 'Rule', 'SpecialChar'], '/', ['Style', 'FontFormat', 'FontName', 'FontSize'], ['TextColor', 'BGColor', '-', 'About'] ] ; FCKConfig.ToolbarSets['Simple'] = [ ['Source','NewPage'],['Bold','Italic','Underline','-','OrderedList','UnorderedList'], ['Outdent','Indent','Blockquote'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Image','Link','Unlink','Rule','SpecialChar'], '/', ['Style','FontFormat','FontName','FontSize'],['TextColor','BGColor','-','About'] ] ; FCKConfig.ToolbarSets['TextOnly'] = [ ['Source', 'NewPage', '-','Bold','Italic','Underline','-','OrderedList','UnorderedList'], ['Outdent','Indent'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','SpecialChar'],['TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize','-','About'] ] ; FCKConfig.ToolbarSets['TextMinimal'] = [ ['Source', 'NewPage', '-', 'Bold','Italic','Underline'],['JustifyLeft','JustifyCenter','JustifyRight'], ['Link','Unlink','SpecialChar'],['TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize','-','About'] ] ; FCKConfig.ToolbarSets['myText'] = [ ['Source', 'NewPage'],['Bold','Italic','Underline'],['JustifyLeft','JustifyCenter','JustifyRight'], ['SpecialChar','TextColor','BGColor'],['About'] ] ; // --------------------------------------------- // Editor area styles FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >' ; FCKConfig.EditorAreaStyles = 'body { font-family: arial; font-size: 10pt; color: black; background-color: white; } ' ; // --------------------------------------------- // User Interface FCKConfig.ImageDlgHideAdvanced = true ; FCKConfig.LinkDlgHideAdvanced = true ; FCKConfig.LinkDlgHideTarget = true ; FCKConfig.DefaultLinkTarget = '_self' ; FCKConfig.ShowBorders = true ; FCKConfig.TabSpaces = 4 ; FCKConfig.MaxUndoLevels = 99 ; FCKConfig.FormatSource = true ; FCKConfig.SourcePopup = false ; FCKConfig.ForcePasteAsPlainText = true ; // Generate <div> tag on [Shift-CR] input FCKConfig.EnterMode = 'div' ; // Show Elements Blocks at startup FCKConfig.StartupShowBlocks = true ; // FCKConfig.DefaultFontFormatLabel = 'normal' ; // FCKConfig.DefaultFontLabel = 'Standard Font-Arial' ; // FCKConfig.DefaultFontSizeLabel = 'medium-10px' ; // FCKConfig.DefaultStyleLabel = 'Standard Style' ; // --------------------------------------------- // Editor output FCKConfig.FormatOutput = true ; FCKConfig.JustifyClasses = [ 'Left', 'Center', 'Right', 'Full' ] ; FCKConfig.IgnoreEmptyParagraphValue = true ; // Font Definitions FCKConfig.FontSizes = '6px;8px;10px;12px;16px' ; FCKConfig.FontNames = 'Arial;Courier New;Tahoma;Times New Roman;Verdana' ; // +----------------------------------------------------------------+ // | Configuration settings for XHTML 1.1 Output | // | Our intention is force all formatting features to use | // | CSS classes or semantic aware elements. | // +----------------------------------------------------------------+ // // Core styles. FCKConfig.CoreStyles.Bold = { Element : 'strong' } ; FCKConfig.CoreStyles.Italic = { Element : 'em' } ; FCKConfig.CoreStyles.Underline = { Element : 'span', Attributes : { 'style' : 'text-decoration:underline;' } } ; FCKConfig.CoreStyles.StrikeThrough = { Element : 'span', Attributes : { 'style' : 'text-decoration:line-through;' } } ; // Font face FCKConfig.CoreStyles.FontFace = { Element : 'span', Attributes : { 'style' : 'font-family:#("Font"); ' } } ; // Font sizes. FCKConfig.CoreStyles.Size = { Element : 'span', Attributes : { 'style' : 'font-size:#("Size"); ' } } ; // Font colors. FCKConfig.EnableMoreFontColors = true ; FCKConfig.CoreStyles.Color = { Element : 'span', Attributes : { 'style' : 'font-color:#("Color"); ' } } ; FCKConfig.CoreStyles.BackColor = { Element : 'span', Styles : { 'style' : 'background-color:#("Color"); ' } } ; // Styles combo. FCKConfig.StylesXmlPath = '' ; FCKConfig.CustomStyles = { 'Computer Code' : { Element : 'pre' }, 'Keyboard Phrase' : { Element : 'kbd' }, 'Sample Text' : { Element : 'sample' }, 'Variable' : { Element : 'variable' }, 'Title Text' : { Element : 'span', Attributes : {'class' : 'titre'} }, 'Inserted Text' : { Element : 'insert' }, 'Cited Work' : { Element : 'cite' }, 'Inline Quotation' : { Element : 'quote' } } ; // -------------------------------------------- // FILE UPLOADS // Enable "Upload" tab in the "Link" window FCKConfig.LinkUpload = true ; // Do not use the default browsers FCKConfig.LinkBrowser = false ; // Specifies the link upload extensions which you wish to use FCKConfig.LinkUploadAllowedExtensions = ".(gif|jpg|png)$" ; // Specifies the link upload extensions which you don't wish to use. FCKConfig.LinkUploadDeniedExtensions = ".(aiff|asf|avi|bmp|csv|doc|fla|flv|gz|gzip|jpeg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|ppt|pxd|qt|ram|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|vsd|wav|wma|wmv|xls|xml)$" ; // -------------------------------------------- // IMAGE UPLOAD // Enable "Upload" tab in the "Link" window FCKConfig.ImageUpload = true ; // Do not use the default browsers FCKConfig.ImageBrowser = true ; // Specifies the image upload extensions which you wish to use FCKConfig.ImageUploadAllowedExtensions = ".(gif|jpg|png)$" ; // Specifies the image upload extensions which you don't wish to use. FCKConfig.ImageUploadDeniedExtensions = ".(bmp)$" ; // -------------------------------------------- // FLASH UPLOAD // Disable "Upload" tab in the "Link" window FCKConfig.FlashUpload = false ; // ------------------------------- E N D ---------------------------------Re: Lots of "undefined" or "not defined" err
Re: Lots of "undefined" or "not defined" err
Looking at the FireBug console, effectively, all the files return a 404!
I don't! And it is true that, a week ago, I eliminated from the server the sources, along with the samples and connectors I am not using. But to be sure that I am using the proper files, just now, I re-installed v2.6.4 and with Dreamweaver I synchronized the server, cloaking "_sources", "_samples" and the connectors except PHP in "filemanager" and get the same results...
I am not knowledgeable enough in javascript to go into the editor code to change anything. But what can I do, short of uploading the source files, to eliminate these errors?
Here are the files on my system:
and on the server:
Re: Lots of "undefined" or "not defined" err
Re: Lots of "undefined" or "not defined" err
b is not defined [Break on this error] (no source for http://rene.dalle.ca/EcoT...editor/editor/js/fckeditorcode_gecko.js) fckedito..._gecko.js (line 36) FCKLang is not defined [Break on this error] FCK.ContextMenu={};FCK.ContextMenu.Liste...Command(A.Name).Execute(A.CustomData);}; fckedito..._gecko.js (line 105) FCKLang is not defined [Break on this error] window.document.dir = FCKLang.Dir ; fckedito...ar=Simple (line 203) FCKLang is not defined [Break on this error] function FCKToolbarSet_Create(A){var B;v...0;i<B.length;i++) B[i].RefreshState();}; fckedito..._gecko.js (line 99)Re: Lots of "undefined" or "not defined" err
That file is still broken. You can search there and you'll find some "../../../../fckeditor/editor" that doesn't exist in the original version.
Re: Lots of "undefined" or "not defined" err
It's fully functional again! We have to be careful with the transfer of compressed files, to ensure that it is done in binary mode!
RD
Re: Lots of "undefined" or "not defined" err
FCKConfig.CoreStyles is undefined [Break on this error] FCKConfig.CoreStyles.Bold = { Element : 'strong' } ; Config.js (line 100) PluginsPath is undefined [Break on this error] var FCKConfig=FCK.Config={};if (document... A.className+=' '+FCKConfig.BodyClass;}; fckedito..._gecko.js (line 33) FCKConfig.ContextMenu is undefined [Break on this error] FCK.ContextMenu={};FCK.ContextMenu.Liste...Command(A.Name).Execute(A.CustomData);}; fckedito..._gecko.js (line 105) C is undefined [Break on this error] function FCKToolbarSet_Create(A){var B;v...0;i<B.length;i++) B[i].RefreshState();}; fckedito..._gecko.js (line 99)And my upload was using FTP in binary mode:
I am really at a loss... Same thing is happening with IE7....
RD
Re: Lots of "undefined" or "not defined" err
All is well now...
RD