I just upgraded a client's site from Drupal 4.7 to 5, and now the FCKeditor is no longer showing up .

Just to eliminate most of the obvious suggestions, here are the things I have done:

  1. Made sure I installed the current version of the module (5.x-1.3-beta)
  2. Made sure I downloaded the current version of FCKeditor itself (2.4.3) and uploaded it into the correct folder (/modules/fckeditor/fckeditor)
  3. Checked the module configuration page and made sure that it was set to exclude mode, so it should appear on all fields not specifically excluded
  4. Made sure I had gone through my 4.7 theme with a fine-tooth comb as per this page and found that it did not include any of the bits of code they said needed to be changed.
  5. Made sure Javascript was enabled in my browser
  6. Checked my server error logs (and found no recent errors)
  7. Checked my browser for errors, and ta-da, found two Javascript errors, but am not sure how to resolve them:

The errors I got:

Drupal is not defined
Line 224: <script type="text/javascript">if (Drupal.jsEnabled) {$(document).ready(function() {oFCKeditor_edit_body.ReplaceTextarea();});}</script>

FCKeditor is not defined
Line 73: var oFCKeditor_edit_body = new FCKeditor( 'edit-body' );

So it looks like some kind of Javascript glitch. Yes, I did see the reference to having to change drupal_set_html_head() to drupal_add_js() in the page on converting 4.7 themes to 5, but I did a search through all my theme files and they don't include the string "drupal_set_html_head" anywhere in them. The theme is a modified version of Antique Modern if that helps any, but none of the modifications dealt with Javascript at all.

Does anyone have any idea how I might be able to resolve this problem and get the editor working again? It's the last remaining issue before the upgrade can go live...

Comments

ontwerpwerk’s picture

you use a custom theme? -> please make sure that your page.tpl.php contains <?php print $scripts ?> in the head element and<?php print $closure ?> somewhere at the end ... both are needed by all the javascript in 5.x.

spidersilk’s picture

Status: Active » Closed (fixed)

That did it - thank you!

It had the closure part at the end, but not the script part in the head. I guess maybe the base theme's original author didn't put the 4.7 equivalent of that in because the theme itself doesn't use any Javascript... Anyway, I added it and now the editor shows up just fine. Thanks again.

ja1d3n’s picture

hmm my problem has been solved...

Before:
print $closure
print $scripts

After:
print $scripts
print $closure