toggletinyMCE() leads to JavaScript runtime error: "Object expected"
| Project: | Tiny Tiny MCE |
| Version: | 6.x-1.12 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Hi,
I am getting a JavaScript runtime error on our intranet Drupal site saying that toggletinyMCE("edit-recipients") and toggletinyMCE("edit-message") lead to runtime error: "Object expected". This error only occurs when a full node is being displayed and does not occur in teaser-view.
Through Visual Studio debugging, I found out that this call is located in the HTML-response that comes from the server and I'm also quite sure it's coming from <?php print $scripts ?> in the page.php-template.
Today I updated tinytinyMCE from 6.x-1.10 to 1.12 and also TinyMCE from 3.2.0.1 to 3.2.1.1, but I still get the same error.
"edit-recipients" does not appear in my tinytinyMCE configuration. Further I reset my tinytinyMCE settings and it did not help.
Any help will be highly appreciated.
Thanks,
Matt

#1
The problem was having the JavaScript injected into the page.tpl.php at the very bottom for speed reasons. The moment I moved
<?php print $scripts ?>back into the header of the HTML, the error disappeard.