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:
- Made sure I installed the current version of the module (5.x-1.3-beta)
- Made sure I downloaded the current version of FCKeditor itself (2.4.3) and uploaded it into the correct folder (/modules/fckeditor/fckeditor)
- 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
- 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.
- Made sure Javascript was enabled in my browser
- Checked my server error logs (and found no recent errors)
- 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
Comment #1
ontwerpwerk commentedyou 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.Comment #2
spidersilk commentedThat 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.
Comment #3
ja1d3n commentedhmm my problem has been solved...
Before:
print $closureprint $scriptsAfter:
print $scriptsprint $closure