When enabling FCKeditor on a Node Comment Form to panels I get duplicate editors. There is a similar post but it was pointed this way. Any ideas?
http://drupal.org/node/122157

Thanks

Comments

Artur Formella’s picture

Status: Active » Postponed (maintainer needs more info)

Please update your FCKeditor script, FCKeditor module and Panels module to the latest.
This bug is fixed. (e.g. http://dev.fckeditor.net/ticket/2381)
Let me know if that worked for you.

paradigmshifter’s picture

Hi arczif,

I upgrade both my fckEditor module to 5.x-2.2-rc3 and my fckEditor the latest nightly build but I still get the duplicate textarea.

I checked fckeditor.js and it does include the appropriate line talked about the ticket you showed.

if ( document.getElementById( this.InstanceName + '___Frame' ) )
		return ;

I'm really at a loss on what to try next. Thanks

paradigmshifter’s picture

"duplicate post... sorry ignore this"

paradigmshifter’s picture

when looking at my generated HTML Dom I have 2 iframe instances with id's
"oFCK_1___Frame"
"oFCK_2___Frame"

Artur Formella’s picture

paradigmshifter, please send me the source code of this page (you can use contact form).

Artur Formella’s picture

Status: Postponed (maintainer needs more info) » Active

Thank you paradigmshifter for your email.
Now we know the bug is on PHP side:

<script type="text/javascript">if (Drupal.jsEnabled)
{$(document).ready(function() {CreateToggle("edit-comment","oFCK_1",
1);});}</script> 
(...)
<script type="text/javascript">if (Drupal.jsEnabled)
{$(document).ready(function() {CreateToggle("edit-comment","oFCK_2",
1);});}</script> 

(...)

<div id="fck_oFCK_1"><textarea id="oFCK_1"></textarea></div> 
<a href="javascript:Toggle('oFCK_1','edit-comment','Switch to plain text
editor','Switch to rich text editor');" id="switch_oFCK_1"
style="display:none">Switch to plain text editor</a>
<div id="fck_oFCK_2"><textarea id="oFCK_2"></textarea></div> 
<a href="javascript:Toggle('oFCK_2','edit-comment','Switch to plain text
editor','Switch to rich text editor');" id="switch_oFCK_2"
style="display:none">Switch to plain text editor</a>

(...)
<script type="text/javascript">if (Drupal.jsEnabled)
{$(document).ready(function()
{window.setTimeout("FCKeditorReplaceTextarea('oFCK_1',oFCK_1);",100);});}</script>

<script type="text/javascript">if (Drupal.jsEnabled)
{$(document).ready(function()
{window.setTimeout("FCKeditorReplaceTextarea('oFCK_2',oFCK_2);",100);});}</script>
wwalc’s picture

Status: Active » Fixed

Check this:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fckeditor/f...
(try the dev release tomorrow).

fckeditor_process_textarea was called twice on the same element for some reason.

paradigmshifter’s picture

It works!!! You guys are awesome! Thanks for the help... Even after skimming through the changes the problem isn't obvious to me. If it can be explained easily I'm curious what the problem was. How was $preprocessed_elements defined(1 of the 2 times called) within the function fckeditor_process_textarea($element) when it wasn't passed?

I'm a php newbie. Thanks again!

Status: Fixed » Closed (fixed)

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