Scripts and functions that I have written or found useful

Drupal WYSIWYG stops working with my new template

May 31st, 2008 Posted in Drupal

I work on the technical side of Drupal and my colleague works on the design part. At one point in time (without realising when), our WYSIWYG editor stopped working and no others would work in its place. We were using HTMLArea/Xinha but tried the YUI as well as the FCKeditor without any luck. The strange thing was that the WYSIWYG editor would appear in the blocks edit page but not when creating/editing a page.

After many hours of searching the database (thinking it might have been HTMLArea that broke it so trying to find that setting which is trying to load 2 editors), I accidently found out that the editor work except in our new template.

After further hours of trying to compare, I eventually found out that it was down to a simple variable not being called into the template at the bottom…

<?php print $closure ?>

Without this, the WYSIWYG doesn’t activate properly. You will notice that it is trying to because the Body textarea is smaller than when the editor is switched off but the editor doesn’t actually appear.

I hope this saves at least one other person hours of frustrating searching!

Post a Comment