FCKeditor fails to replace textareas and throws the following javascript errors::

Error: FCKeditor is not defined
Source File: http://somesite.com/node/add/story
Line: 123
var oFCKeditor_edit_body = new FCKeditor( 'edit-body' );
Error: oFCKeditor_edit_body has no properties
Source File: http://somesite.com/node/add/story
Line: 136
oFCKeditor_edit_body.ReplaceTextarea();
Error: FCKeditor is not defined
Source File: http://somesite.com/node/add/story
Line: 160
var oFCKeditor_edit_log = new FCKeditor( 'edit-log' );
Error: oFCKeditor_edit_log has no properties
Source File: http://somesite.com/node/add/story
Line: 173
oFCKeditor_edit_log.ReplaceTextarea();

*/
FCKeditor module is 5.x-1.1
FCKeditor app is 2.3.2
module enabled;
access controls: anon-users and auth-users get all 3 FCK perms;
input format is Full HTML;

directory structure is right:: module/fckeditor/fckeditor folders;
Everything by the book. Could pass off admin log in and url if someone wants to verify.
Otherwise, there seems to be an issue here.

One last thing: var oFCKeditor_edit_body = new FCKeditor( 'edit-body' );

Right here: FCKeditor('edit-body'); The hyphen (dash) between edit and body. That's a Drupal specific indentifier, right? So Drupal is using php to write this script on the fly, right? But, javascript can't have dashed arguments, can it? Is there a simple str_replace() in an include that's missing or something?

Thanks everyone - for Drupal, that is.
Wish I could be more help
Larry

Comments

ontwerpwerk’s picture

the dashes should be no problem. (they work fine in all environments I've used drupal and the FCKeditor)

please check if all FCKeditor files are extracted and placed at the correct locations, check if there are any FCKeditor related Page not found / 404 message in your error log

For reference, try this issue: http://drupal.org/node/106367

katana3x9’s picture

okay, so I started over again - new Drupal install - and paid strict attention to each and every modification, no matter how insignificant.

FCKeditor worked brialliantly out of the box. Perfect, except for an occasional "IE cannot open the page such and such - which went away with setting clean urls=true

Add ICME and still had great FCK support. No problems.

I added a vocabulary "stories" and ticked "story" as the content type. Suddenly, FCK is gone and all of the aforementioned javascript errors show up.

ontwerpwerk’s picture

do you have any path modules installed?

could you try to find out what exactly is changing when you enable the vocabulary

BTW. Why on earth do you allow anonymous users to upload files? (thats what the 'allow fckeditor file uploads' permission does)...

katana3x9’s picture

Sheesh - I just finished another install. Again, FCK great out of the box.

I found an issue with the theme (a left over re-vamp of bluemarine for 4.7) and all now seems well. I had to add the scripts code in the head of page.tpl.php <?php print $scripts ?>
I had tried this before when FCK quit showing up, but it didn't work. Now I'm wondering if that might have been a cache issue. I didn't refresh the hell out of it. Is there a solid thread on how the cache works? Might help me personally.

Is the Drupal cache re-set only when, say, a particular set of configuration parameters is changed? Is there a way to fresh it manually?

When I try to add categories and post content inside those I'll watch the path and see if it flutters. I'm thinking now it was my own ignorance all along, because the taxonomy is already working with the Forum structure, and FCK is working fine there.

New issue. I had this whipped, I thought, with clean urls - the dreaded IE can't open page error.
I get it now even with clean urls. I saw a post with this in it. Was there a solution? I'll try to hunt that down.

Also, I'm taking my dialogue out of the FCK issues thread and back to the Forums. It might be a pain in the neck to manage the many idiosyncrasies around FCK but that isn't a bug.

Chris Star’s picture

K- no, no path modules. I installed new and started with nothing but FCK. evrything looked good. it worked 6 or 7 times and then started throwing the same errors I listed when posting this issue.

In IE - the errors as described. In FF it tries, but doesn't expand the text area. Just draws lines.

This is FCK 2.3.2 Is that the right version? And D 5.1 with the 5.x.1.1 module.

ontwerpwerk’s picture

that sounds really puzzling

- is this with the default theme (garland)

ontwerpwerk’s picture

is there an improvement with the latest version?

At the moment that means at least revision 1.19.2.3 for fckeditor.module and 1.4.4.2 for fckeditor.config.js - it should be downloadable in the next cron run

ontwerpwerk’s picture

Status: Active » Closed (duplicate)

cleaning up the queue, continue in this issue which seems to be the same: http://drupal.org/node/113226