FCKeditor not showing up with no $closure

cardell - November 27, 2007 - 16:42
Project:FCKeditor - WYSIWYG HTML editor
Version:5.x-2.0-beta
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

FCKeditor is not showing up for me initially.

I do have a custom theme, but it has the script and closure tags.

The toggle was not showing up even though it's set. When I looked at the source I saw it had a "display: none" style tag. The code behind this is:

    $wysiwyg_link .= "<a href=\"javascript:Toggle('{$js_id}','{$element['#id']}','".t("Switch to plain text editor")."','".t("Switch to rich text editor")."');\" id=\"switch_{$js_id}\" ".($fckeditorOn?"style=\"display:none\"":"").">";

Where it sets the display off if FCKeditor is on. Which I don't understand.

I went in and took that out so the toggle would show, and it shows up with "Switch to plain text". If I click this it loads the FCKeditor. It switches to the plain textarea, but if I click again I get FCKeditor. Does this make any sense why this would be happening and not loading initially.

My textareas are coming up with only 3 rows (I looked and couldn't remember where to change that setting), but I set Minimum Rows in FCKeditor to 1 to see if this was causing it. It still is not coming up.

This is the HTML generated when the page is displayed:

<div id="fck_oFCK_1">
<textarea id="oFCK_1"/>
</div>
<textarea id="edit-body" class="form-textarea required" name="body" rows="20" cols="60" style="display: none;"/>

Once I click the toggle button, it expands and adds all the additional HTML (iframes, etc.) of FCK in the fck_oFCK_1 div.

Any ideas what is causing this. I know it must be something with my theme or stylesheet, but I can't tell what is causing it.

Thanks

#1

cardell - November 27, 2007 - 17:17

Added Info:

The smaller textarea (3 rows) is only showing when FCKeditor is enabled. If I disable FCKeditor it goes back to the default, larger textarea.

#2

wwalc - November 29, 2007 - 10:19

Does this error appear when you switch back to Garland theme?

Does Firebug shows you any errors? The smaller textarea should be replaced by FCKeditor so I guess you are getting some javascript error while loading the page, take a look at Firebug and please write us what errors do you get.

#3

soter82 - November 29, 2007 - 17:04
Category:support request» bug report

Hi, I've a similar problem with FCKeditor: just after a new installation, I installed FCKefitor module + FCKeditor 2.5b (but the problem there's even with FCKeditor stable version), following the README.txt file I did the right steps to install and configure it as well, but i can't view FCKeditor. It seems the script isn't loaded. Firebug doesn't show any errors, the only call to FCKeditor is in the stylesheet call in the header:
<style media="all" type="text/css">@import "/path_to_site/sites/all/modules/fckeditor/fckeditor.css";</style>
and the text-area markup is:
<textarea id="edit-comment" class="form-textarea resizable required processed" name="comment" rows="15" cols="60"/>.
Up to the 5.x.1 FCKeditor module version all worked fine, but I've to use the new version for better controlling the many toolbars I've associated to my roles.

Even if I change theme, the editor doesn't show up. I check my theme: the closure tag is at the end of page.tpl.php page.

Sorry for may bad English, I'll still hearing any solutions, thanks.

#4

cardell - December 1, 2007 - 00:40

Okay, you never know where the answer will come.

I had checked the Firebug errors before, but the errors that came up had to do with another module, not FCKeditor, so I dismissed them. Based on wwalc's post, I went back and checked them again. This time I traced it down to the module that was giving the error (taxonomy_ticker's js file). It had an object it was referencing that wasn't being found. That must have thrown off the trigger for the FCKeditor script to initialize the textarea.

Anyway, I threw in an if statement to the taxonomy_ticker.js and...bing bam boom...FCKeditor comes up.

Thanks

#5

latentdabbler - December 17, 2007 - 04:05

Well, I had the same exact problem with my theme, except that I did not have any javascript errors to fix. I figured out after digging that I had taken out the line:

<?php print $closure; ?>

from my theme's page template (page.tpl.php) just before the end body tag and that was the mistake that was causing the disappearing editor for me. FCKeditor puts in some necessary script into the $closure page variable and I didn't know it was a necessary one to have in the template.

Maybe this'll help someone else who is still having this problem.

#6

sime - January 30, 2008 - 06:01
Title:FCKeditor not showing up» FCKeditor not showing up with no $closure
Category:bug report» support request
Status:active» fixed

Same symptom as cardell, and same solution as latentdabbler.

If you don't print $closure in your theme it won't work (it won't show errors either). Closing this, although it seems possible that some of the issues here are for different problems.

#7

Anonymous (not verified) - February 13, 2008 - 06:01
Status:fixed» closed

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

#8

lusse - April 26, 2009 - 12:33

I have the EXACT same problem. If I take away "display:none:" I can then swap to the editor. But otherwise it wont show at all. So the editor is working but not really showing by default.

Was it the Taxonomy module that was causing the problem? how did you alter the .js file?

 
 

Drupal is a registered trademark of Dries Buytaert.