WordPress TinyMCE Broken and Missing

WordPress has integrated a basic version of the TinyMCE editor with the core installation. This let’s you edit your posts visually without having to deal with the code behind making posts look nice. This is an amazing time saver if it works. Today, TinyMCE threw up it’s hands and suddenly stopped working for me. At first I thought it was a result of my recent WordPress update to 2.3.2 but a rollback to 2.3.1 didn’t fix the problem. I spent an hour scouring the wordpress forums and Google and attempting various “fixes” but none of them worked for me. I finally did a clean install but the problem was still there, so I finally turned my lazy brain on to figure out what the problem was and fix it. Hopefully this will help someone who is experiencing the same frustration.

The Problem

TinyMCE in WordPress does not work. The editor will seemingly be stuck in Code mode, but none of the standard non-visual editor buttons will be visible. I didn’t think to take a screenshot, so here is a poorly done photoshop version of what it will probably look like:TinyMCE Broken

Additionally, you may get javascript errors like unterminated string literal which will ultimately lead to realTinyMCE is not defined.

The Cause

In my particular case it was PHP. TinyMCE uses some calls that do not behave as expected in some older versions. I was running version 4.3.2 which came with my (dv) server from Mediatemple.

Solution

In my case, it was easier to upgrade to PHP5 since I could do that on a per domain basis on my server. If you happen to be hosting with Mediatemple and have run into this problem, you can easily change the version of PHP your scripts use. Mediatemple has graciously put the tutorials in the knowledge base: Upgrade to PHP5 on (dv) 3.0 Dedicated Virtual Servers(gs) HOWTO: Specify the version of php for web applications

If you can’t change the version of PHP that you’re using you can try patching TinyMCE. I haven’t done this personally so I can’t provide any specific instructions. If anyone has another fix that doesn’t require upgrading PHP please comment for others!

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.