1

TinyMCE is working just fine, all except for the popup windows. They come up blank, and after a little bit of Google searching, apparently it has something to do with cross domain errors with Firefox and Django. I tried using document.domain, but I have a feeling that it doesn't work when you're using the Django development server (http://127.0.0.1:8000).

rk919
  • 307
  • 2
  • 6
  • 13
  • 1
    I have no problem with tinyMCE popups and Django's dev server. Try Firebug (http://getfirebug.com/) to see if there happens anything suspicious during the request. – Benjamin Wohlwend Feb 14 '10 at 08:05
  • What is your `MEDIA_URL` set to? – Will Hardy Feb 14 '10 at 09:38
  • MEDIA_URL = 'http://localhost:8000/m/' with the http:// before localhost. – rk919 Feb 14 '10 at 10:06
  • try using a relative link for `MEDIA_URL`, eg `MEDIA_URL = '/m/'`. Using firebug (or the log from the dev server) to examine the request is also a good idea. – Will Hardy Feb 17 '10 at 23:56
  • I looked at the request via Firebug. It says that there is an Illegal document.domain error. The document.domain for my dev server is http://127.0.0.1:8000, which I don't see why that would be a problem. Firebug also says that tinyMCEPopup is undefined. All the file permissions on all of the tinyMCE folders are on chmod 777, so I'm assuming that there is no problem accessing the js files required for the popup. – rk919 Feb 18 '10 at 07:45

2 Answers2

1

There's nothing wrong with 127.0.0.1 as a domain. The problem is that it's different to your media domain localhost, although they both point to the same thing.

TinyMCE doesn't like different domains for the media, which is why having a relative MEDIA_URL would work. Using the URL http://localhost:8000/ to access your server would also work, because the domain would be the same as the MEDIA_URL, so too would setting your MEDIA_URL to 127.0.0.1:8000/m/ and accessing it with http://127.0.0.1:8000/.

Will Hardy
  • 14,588
  • 5
  • 44
  • 43
0

Instead of using 127.0.0.1:8000, if I use localhost:8000, everything seems to work perfectly. I'm not sure why. Maybe it's because localhost:8000 is a domain and 127.0.0.1:800 is not.

rk919
  • 307
  • 2
  • 6
  • 13