For the non-technical just trying to fix their blog, the quick fix is:
/wp-includes/js/scriptaculous/wp-scriptaculous.js in your favourite editor
- Comment or delete the last line. Example:
make it look like:
What really happens is that the TinyMCE script tries to find the url it is loaded from (look in
/wp-includes/js/tinymce/tiny_mce_gzip.php line 257). Because of some weird problem caused by the Scriptaculous library, all of the script tags that are located after the Scriptaculous one in the source are removed from the DOM (become invisible to calls like
document.getElementsByTagName("script")). TinyMCE has trouble finding the url because TinyMCE is *usually* loaded after Scriptaculous, so the visual editor won't work. In some cases, if you hit refresh enough times, you might cause TinyMCE script to be loaded before Scriptaculous and then it would work.
Now, the problem with Scriptaculous resides in the following code, which handles loading additional libraries via the
load= parameter (see
$A applied to the scripts collection seems to cause the weird side effect of removing some from the DOM.
$A comes from the Prototype framework and should normally extend the DOM objects with additional functionality. I am not sure if this weird script-disappearing thing is a known issue with the Prototype framework, so maybe somebody can comment on that.
Anyway, the fix I presented will prevent the buggy code from being run. It is not needed because the libraries are loaded one by one, manually. Some workarounds presented earlier might work also, but this seems to be the cleanest way.