Hello,

The editor itself is working great but everytime it loads I get two Javascript errors one right after the other. This is as my Admin account that has access to the Full HTML editor. I configured the fckeditor.config.js file and uncommented the "FCKConfig.Plugins" lines and the line that enables the buttons for "DrupalPageBreak" and "PageBreak" in the toolbar. I'm not sure what I could have done wrong, as that's all I touched.

Drupal 5.5
PHP 5.2.5
MySQL 5.0.41
Running locally on my Mac Mini through Mac OS X Leopard.

Any help would be great!

Comments

wwalc’s picture

Hello,

1) Did you uncomment these three lines in fckeditor.config.js?

FCKConfig.PluginsPath = '../../plugins/' ;
FCKConfig.Plugins.Add( 'drupalbreak' ) ;
FCKConfig.Plugins.Add( 'drupalpagebreak' ) ;

2) Did you refresh your browser's cache?

3) Take a look at source code of your page and search for something like that:

oFCK_1.Config['CustomConfigurationsPath'] = '/drupal5g/modules/fckeditor/fckeditor.config.js';

make sure that you have modified the right file.

4) Finally, please take a look at access log of your web server and search for plugins/drupalbreak/fckplugin.js, it may give you some idea on what's happening.

rjleigh’s picture

I'm having a similar problem. DrupalBreak used to work on my site, but this version (5.x-2.x-dev (2007-Dec-03) + using FCK 2.5.1 ) throws the error.

I see my correct paths in the page:

oFCK_1.BasePath	= '/sites/default/modules/fckeditor/fckeditor/';
oFCK_1.Config['CustomConfigurationsPath'] = '/sites/default/modules/fckeditor/fckeditor.config.js';

But it does seem to be some sort of path issue. In fact, I'm also not seeing the correct fckstyles.xml , wheter it's in
\sites\default\modules\fckeditor
or
\sites\default\modules\fckeditor\fckeditor

wwalc’s picture

Please take a look at apache logs and search for the files that are not being loaded by FCKeditor, it should point you to the solution.

rjleigh’s picture

Couldn't find anything in the apache log, so at the time I just disabled i since I didn't have time to look further.

Downloaded the latest dev version, rebuilt my config files from scratch and now it works, so I guess something funky must have been in there.

The styles issue was a little different - first, until I looked at the code in detail, I didn't realize I could put it in the theme directory. Second, I was always confused the the presence of the "red title" entry, but then I realized that it is added outside of the xml file, in the fckconfig.js file.

wwalc’s picture

Status: Active » Closed (fixed)
richardb’s picture

I had the same problem.
Everything works fine with a clean install, adding the pagebreak plugin works fine too, but once you start removing other toolbar items these errors start coming.
It was as if the other toolbar items took long enough to load for the pagebreak button code to be loaded, but when they were removed a race condition occured and the pagebreak code wasn't loaded when the button was called..
I found that placing these lines:
FCKConfig.PluginsPath = '../../plugins/' ;
FCKConfig.Plugins.Add( 'imgassist' ) ;
FCKConfig.Plugins.Add( 'drupalbreak' ) ;
FCKConfig.Plugins.Add( 'drupalpagebreak' ) ;

above the toolbar definitions in fckeditor.config.js solved the problem.
Sorry, no time for a patch right now.

Eduard Grebe’s picture

Status: Closed (fixed) » Active

I still get this error in both the beta2 and latest dev releases, even when no buttons have been removed. Moving lines enabling the plugins to above the toolbar lines makes no difference. Any ideas?

wwalc’s picture

These three lines in fckeditor.config.js should help you to get rid of those errors:

FCKConfig.PluginsPath = '../../plugins/' ;
FCKConfig.Plugins.Add( 'drupalbreak' ) ;
FCKConfig.Plugins.Add( 'drupalpagebreak' ) ; 

remember to refresh your browser's cache and restart browser if necessary.
Make sure that drupalbreak and drupalpagebreak plugins exist in modules\fckeditor\plugins directory.

There is no magic here, if you still get those errors, use IE + Fiddler or Firefox + Tamper Data to trace HTTP requests.
If you get such error, it means that FCKeditor is looking for "plugins/drupalbreak/fckplugin.js" but can't find it in the specified path, looking at the HTTP requests should help you to locate the problem.

Balefire’s picture

I can confirm that the above tip of moving the FCKConfig.PluginsPath etc lines to above the toolbar definitions solve the unknown toolbar item error if you remove other buttons (for me at least). Put them back below the modified definitions and the messages re-appear.

emanhossny’s picture

i had the same problem. Actually, what i did to add the plugin are the following 2 steps:
1-add plugin to fckconfig.js
FCKConfig.Plugins.Add( 'drupalbreak') ;

2-add the button to the default toolbar:
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','-','About'],
['DrupalBreak'] //added by Eman
] ;

but still i have the same problem, can any one help me?

drew reece’s picture

er, are you all missing something?
For me Richard B has the solution in post #6

I moved the…

 //uncomment these three lines to enable teaser break and page break plugins
 //remember to add 'DrupalBreak' and 'DrupalPageBreak' buttons to the toolbar
 FCKConfig.PluginsPath = '../../plugins/' ;
 FCKConfig.Plugins.Add( 'imgassist' ) ;
 FCKConfig.Plugins.Add( 'drupalbreak' ) ;
 FCKConfig.Plugins.Add( 'drupalpagebreak' ) ;

…to the top of the fckeditor.config.js (below the cvs $ID $) and now the drupal buttons appear. To me it looks like we are calling for the buttons to be added to the plugins after our config has tried to create a toolbar using buttons that haven't been added as plugins.

Usual caveat - it now works for me.

Drew

wwalc’s picture

Status: Active » Fixed

Ok, I've moved code including plugin at the beginning of fckeditor.config.js, it shouldn't break anything and it seems that it helped in some cases.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

physiotek’s picture

#6 works for me;
thanks

babbage’s picture

(posted in wrong issue by mistake)