Closed (won't fix)
Project:
TinyMCE
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
13 Oct 2008 at 21:37 UTC
Updated:
28 May 2011 at 00:27 UTC
Jump to comment: Most recent file
When the optimizing feature is selected, TinyMCE does not load properly. Firebug shows thte following 2 errors:
1) "tinyMCE is undefined" and
tinyMCE is undefined
[Break on this error] tinyMCE.init({
2) "u" is undefined whatever this means!
u is undefined
[Break on this error] ;var tinymce={majorVersion:'3',minorVers....js,v 1.2 2007/11/19 10:05:48 goba Exp $
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | wysiwyg.png | 44.12 KB | awilliams |
Comments
Comment #1
attiks commentedJust the confirm, I ran into the same problem :/
Comment #2
pillarsdotnet commentedditto.
FWIW, I tried changing between the minified and the source js files but the problem remains.
Also tried stripping carriage-returns. No joy.
Comment #3
btopro commentedIf it's anything like older issues I think it has something to do with the load order. Meaning that Tiny loads in the incorrect order relative to everything else. Haven't looked into it deeper but it's my guess from previous issues i've had in the 5 branch.
Comment #4
btopro commentedDon't have time to throw this into a formal patch but i've been able to get it to be compatible. It's simple...force all drupal_add_js files to be excluded from the aggregation function drupal has :) That way it optimizes everything else and still lets tiny work :)
I don't have time for a formal patch but here's the code you need to change over to. Basically, find every drupal_add_js line and add this to the end ,'module','header',FALSE,TRUE,FALSE . The last FALSE will tell it NOT to be included in the optimization. Also, if you see lines that are inserted with the 'inline' string then don't include 'module'.
if (is_dir($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/plugins/imagemanager/') && user_access('access tinymce imagemanager') ) {
// if tinymce imagemanager is installed
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/plugins/imagemanager/jscripts/mcimagemanager.js','module','header',FALSE,TRUE,FALSE);
}
if (is_dir($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/plugins/filemanager/') && user_access('access tinymce filemanager') ) {
.mceEditor img { display: inline; }// if tinymce filemanager is installed
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/plugins/filemanager/jscripts/mcfilemanager.js','module','header',FALSE,TRUE,FALSE);
}
// TinyMCE Compressor 1.0.9 and greater
if (file_exists($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js')) {
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js','module','header',FALSE,TRUE,FALSE);
drupal_add_js($tinymce_gz_invoke, 'inline','header',FALSE,TRUE,FALSE);
}
// TinyMCE Compressor (versions < 1.0.9)
elseif (file_exists($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php')) {
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php','module','header',FALSE,TRUE,FALSE);
}
else {
// For some crazy reason IE will only load this JS file if the absolute reference is given to it.
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce.js','module','header',FALSE,TRUE,FALSE);
}
drupal_add_js($js_toggle, 'inline','header',FALSE,TRUE,FALSE);
// We have to do this becuase of some unfocused CSS in certain themes. See http://drupal.org/node/18879 for details
drupal_set_html_head('
');
}
// Load a TinyMCE init for each textarea.
if ($init) drupal_add_js($tinymce_invoke, 'inline','header',FALSE,TRUE,FALSE);
Comment #5
spiffyd commentedIt'll be great if someone can roll this into a patch - I actually never done patches before but I'll try to roll out a tarball some time early January after all this holiday huzzah~... Happy Holidays everyone!
Comment #6
p.steiner commentedi have the same problem, but i can not find the above strings in the source code. perhaps i use the latest wysiwyg (new api)
@spiffyd what do you mean with: "When the optimizing feature is selected"?
Where can i enable/disalbe this
Comment #7
btopro commentedIt's under admin/settings/performance in Drupal 6. There's a setting to Compress CSS and another to Compress JavaScript. If you turn off the compress JavaScript part then this module works just fine. If you want it turned on (huge performance savings) then modify the code I wrote above.
Comment #8
jo1ene commentedI have this problem and #4 solves it for me.
Comment #9
taote commentedSame problem but #4 didn´t solve it.
Comment #10
iva2k commentedFYI, I submitted a patch for TinyMCE compressor here.
Comment #11
awilliams commentedI have a similar problem and I have tried all the advise on this page but it did not resolve or work. The funny thing is that some form in our site work well on same setting as attached:
But when Optimize JavaScript files is disable all TinyMCE Module form associated with wysiwyg works. Please can someone advise who has workable solution
Firebug reporeted 3 errors;
missing ; before statement
[Break on this error] * jQuery UI Dialog 1.6\n
js_b0e...f00b.js (line 4081)
jQuery is not defined
[Break on this error] jQuery.extend(Drupal.settings, { "base...th": "/CTC/node/add/news-article" });
news-article (line 16)
jQuery is not defined
[Break on this error] })(jQuery);
js_cbc...6267.js (line 223)
Comment #12
pillarsdotnet commented