There is a javascript error when fckeditor is initiated in firefox (for version 3.6.0 of Drupal and 2.0 of FCKeditor)

Error: FCK.LinkedField has no properties
Source File: http://drupal/modules/fckeditor/lib//editor/js/fckeditorcode_gecko_1.js
Line: 14

This is caused by the fact that the hidden textarea' name is not the same ans the instance name provided to FCKeditor. It works in IE because of the ol document.all behaviour (I suspect).

You need to make a trivial change to fckeditor.module in
function fckeditor_create_editor

change the InstanceName parameter so that the line reads

$link = "$base_path/editor/fckeditor.html?InstanceName=edit[$name]";

This then bring the instancename inline with the name of the textarea and fckeditor thenworks with IE and Firefox :)

Comments

ransom’s picture

With a bit of adition from another post I read (cant rember the id) it works grate!

$link = "$base_path"."editor/fckeditor.html?InstanceName=edit[$name]";

Though I'm sure that can also be acomplished by changing the line above it also.

PS: Thanks for the prompt reply :)

baudolino’s picture

Status: Fixed » Needs review

Please don't mark as fixed until the proposed patch has been accepted into the code.

maxferrario’s picture

I tried the patches and now FCKEditor does work in Firefox... but is not working in Internet Explorer anymore (IE6 on WinXP).

The textareas where the editor is supposed to be displayed are completely missing: I only see (for instance) a "Body:" label and nothing more.

The code I find in the page is this

<div class="form-item">
<label for="edit-body">Body:</label><span class="form-required">*</span><br />
<textarea wrap="virtual" cols="60" rows="20" name="edit[body]" id="edit-body" class="textarea required"></textarea>
<script>document.getElementById('edit-body').style.display = 'none';</script>
<input type="hidden" id="edit-body___Config" value="&DefaultLanguage=en&AutoDetectLanguage=true&SkinPath=/drupal_root/modules/fckeditor/lib/editor/skins/default/&ToolbarStartExpanded=false">
<iframe id="edit-body___Frame" src="/drupal_root/modules/fckeditor/lib/editor/fckeditor.html?InstanceName=edit[body]&Toolbar=Default" width="100%" height="100%" frameborder="no" scrolling="no">
</iframe>
</div>

Geraint’s picture

Works fine for me in IE 6.0.2900.2180 on XP pro.

Try a fixed height for your IFrame setting - I saw another post about that being a problem in IE.

I just did a test - using 100% in the fckeditor height setting gives me nothing but the label as you saw, but using a fixed 500 it works fine :-).

maxferrario’s picture

You are right: if i reset to the defaults the module settings everything works fine even with IE6.

Thanks

Junyor’s picture

Status: Needs review » Fixed

Fix committed for DRUPAL-4-6 and HEAD.

Anonymous’s picture

szczym’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)