TinyMCE error: ‘Permission denied to get property Window.tinymce’

TinyMCE editor is a great piece of software that I use a lot in my CMS projects. For a recent project I was working with a custom file browser for inserting hyperlinks into my content and I ran into an error that I figured I would document and share because I had a difficult time finding a solution online.

The error I received when going to my custom pop-up page was in two parts:

  • Error: Permission denied to get property Window.tinymce in the file /tiny_mce/tiny_mce_popup.js – Line 20
  • Error: tinyMCEPopup.onInit is undefined in my pop-up file

In my initial search, I found a post on another blog about adding a document.domain variable to the top of tiny_mce_popup.js, but this didn’t seem to work.

I kept playing with it, re-downloaded the TinyMCE files and just about rebuilt my editors again. All the while I had a working version on another domain (actually the same code as I was working on a new version of the software) and just couldn’t figure out the issue.

I was becoming frustrated and since I knew it was a permissions issue, I figured I would try something simple that I didn’t think would solve the issue. While testing, I did not have ‘http://www.domain.com’ in my URL, just ‘http://domain.com’. So, I changed it to ‘http://www.domain.com’ and wouldn’t you know, it worked.

It took a lot of time to figure out, so hopefully anyone else that runs across this post can check that first and add a redirect to their application to make sure they are always using ‘www.’  To setup a www redirect using .htaccess, read this.

September 19th, 2008 Posted in Development, Technology

Tags: , , ,

Sorry, comments for this entry are closed at this time.