Support Forum

TinyMCE Unsafe Javascript Attempt on Sub Domain

RG Richard Greaves
Richard Greaves
Member

Whenever we try to use something that has TinyMCE open up in a frame (such as trying to add a hyperlink), we get the following message:

Unsafe JavaScript attempt to access frame with URL http://sub.domain.com/forums/?new=topic from frame with URL http://sub.domain.com/wp-content/sp-resources/forum-plugins/tinymce-richtext/tinymce/themes/advanced/link.htm?mce_rdomain=domain.com. Domains, protocols and ports must match.

My guess is this is caused because the mce_rdomain is just “domain.com” instead of “sub.domain.com”, but there seems to be no way to fix this.

Any ideas? This is a pretty major issue.

15 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Wow – that’s a first.
So – is your WP theme using frames?

RG Richard Greaves
Richard Greaves
Member

Thanks for the quick replies. Sorry I didn’t respond, I was out last week.

The WP theme doesn’t use frames. It’s a custom-built one, so I’m confident of that.

We are using a basic WP redirect for permalinks, but that’s about it. We have the forums running off of /forums.

YS Yellow Swordfish
Yellow Swordfish
Member

Is the forum page excluded from the redirection? Do all of the forum views load at all?

RG Richard Greaves
Richard Greaves
Member

The forum should still have it’s normal redirection, but that’s it.

The forums themselves work just fine. It’s just the TinyMCE popup boxes that generate this error.

YS Yellow Swordfish
Yellow Swordfish
Member

Would you be willing to try a small code edit for me? I am clutching at straws really but there is a hint of something in the Moxie docs which might be a factor here.

The file is /wp-content/sp-resources/forum-plugins/inymce-richtext/tinymce/sp-tinymce-init.php

Starting on line 29 is the long list of ‘init’ statements and we need to try adding a new one. Maybe even put it as the first one. Note the format. So could you try:

document_base_url : "http://your-domain/forum-url/",

At least I think that would be right! see if this helps?

RG Richard Greaves
Richard Greaves
Member

It didn’t work unfortunately.

Any other ideas?

YS Yellow Swordfish
Yellow Swordfish
Member

None at all 🙂 but I would like to continue to explore that one. This is a completely unique report – the first of it’s kind in 6 years so I am struggling a bit to understand what might be happening. Of course the fact that it is unique does suggest that the issue stems from something environmental to your setup – server setting maybe or some sort of Apache module I have not come across before.

Would you be wiling to send me the actual full text of the message with the correct domain names and full paths in place? If you wish to keep these private then you could send them to me in a PM…

Also – if willing – perhaps you could also ask your host support of they have any idea what the cause may be…?

RG Richard Greaves
Richard Greaves
Member

I will PM you the complete message.

This is actually an internally managed box (we manage it ourselves). The server was running perfectly fine before we upgraded to the latest version (we were previously using 3.x before the upgrade). We are now running the latest version. No environmental settings (including redirects) have been changed since then.

Thanks for the help.

MP Mr Papa
Mr Papa
Member

Andy/Richard, out of curiosity, have you tried a quick switch to the default wp theme and see if it works?  I am seeing the theme id365 doing a couple odd things…  its loading:

<script type='text/javascript' src='http://365dev.internaldrive.com/wp-content/themes/id365/scripts/tiny_mce/jquery.tinymce.js?ver=1319650545'></script>
 <script type='text/javascript' src='http://365dev.internaldrive.com/wp-content/themes/id365/scripts/forums.js?ver=1319650539'></script>

So the wp theme is loading its own version of tinymce (the jquery version)???  they may very well be conflicting…

also, curious as to what forums.js is for the theme too???

RG Richard Greaves
Richard Greaves
Member

So, forums.js shouldn’t have been there. It was from the previous forum software I had in there.

However, I completely emptied the file out, but the same problem still persists.

If I switch back to the default WP theme, then the problem does seem to go away, so I’m not sure what’s special about our theme that could be causing issues. As far as I can tell, we’re only loading two JS files (excluding jQuery) that could cause any kind of issues, but I don’t know what issue that could be since they’re both rather simple.

YS Yellow Swordfish
Yellow Swordfish
Member

Well using your theme would you be able to  deactivate whatever is loading the jQuery version of tinymce and that might, as Steve said, be the issue?

RG Richard Greaves
Richard Greaves
Member

Solved! Thanks for the assist Andy and Steve. There was still the older version of the tinyMCE jQuery file as you mentioned conflicting with the Simple:Press version. Removed the file and all is well.