WordPress TinyMCE (visual editor) disappearance

We have a very weird problem with one of sites running WordPress. Suddenly, TinyMCE visual editor stopped working. It just disappeared, and we only got the weird:

realTinyMCE is not defined

error in the console.

Of course  visual editor was turned on in users preferences and all that stuff. Switching to a different theme was solving the problem.

Turned out that the problem was in the functions.php file which was located in WordPress current theme's directory. And the reason was the most weird one you can imagine! We had several excessive line breaks after the php closing tag!!

Have a look at these pictures:

TinyMCE disappeared with error.

Take  notice of these 2 excessive line breaks after the closing tag of the functions.php file.

Just remove them…

Remove line breaks and it

And everything's back to normal again!

So, check that the functions.php file in your current WordPress theme doesn't have any excessive line breaks after the closing php tag.

2 Responses to “WordPress TinyMCE (visual editor) disappearance”

  1. andrew Says:

    amazing, same exact thing happened to me out of the blue — never would have guessed that the issues would be resolved this way — cheers!

    -ai

  2. Orabloggo » Blog Archive » I-guide vol. II Says:

    [...] http://macdiggs.com/index.php/2007/12/07/wordpress-tinymce-visual-editor-disappearance/  [...]

Leave a Reply