Home Codex Javascript

Twiners Codex

Web Hosts

Lunarpages.com Web Hosting
Javascript


Tiny MCE Error

For those of you using TinyMCE in your Joomla 1.0.x install, you may find that there's an error that occurs when you're trying to create a link or add an image.  Basically, the issue presents itself when TinyMCE needs to load a popup window, and it manifests itself by showing a blank window and issuing the following error:

uncaught exception: Permission denied to get property Window.tinyMCE

 ...followed by a couple of complaints stating:

tinyMCE has no properties

This problem is caused by the TinyMCE javascript files residing in a different domain or subdomain than the admin site.  If you want to know why it occurs, Mozilla discusses it under the topic, Same Origin Policy.  Their fix is to enter:

document.domain = "domain.com";

... which would be implemented by editing the tiny_mce_popup.js file (inside the TinyMCE folder) and adding the line at the top of the init block -- so that it's the first line inside init.

In the case of our Joomla install, this did not work and we ended up with a different error... because the issue had to do with the live site variable inside configuration.php.  We recommend, therefore, not editing tiny_mce_popup.js, but rather editing your configuration.php file to show 'www' in your $mosConfig_live_site variable.  Like so:

$mosConfig_live_site = 'http://www.yoursite.com';

It worked for us, and we hope that it works for you!