after installing
6.x-1.1-dev module
and tinyMCE 3.0.6.1 in
sites/all/modules/tinymce/
so the actual path to javascript files is
\sites\all\modules\tinymce\tinymce\jscripts\tiny_mce\tiny_mce.js
admin/settings/tinymce/add
configuring profile displays
warning: Invalid argument supplied for foreach() in I:\drupal\includes\form.inc on line 1181.
on profile:
default state: enabled
assigning tinymce permissions
trying to create story gives following error on firebug
tinyMCE is not defined
[Break on this error] tinyMCE.init({
same thing happens with 1.x-dev version
and with tinymce 2.1.3 version
Comments
Comment #1
giorgoskfor tinyMCE 6.x-1.1-dev the javascript errors are 2
both indicating the same line
also the collapsible fieldsets are not working
but when disabling tinyMCE they work again
possibly there is a confict with
collapsible fieldsets and tinyMCE javascript code ???
I also forgot to mention that this happens in
a clean firefox 2.0.0.13, IE6, IE7
on localhost with XAMPP 1.6.3a
Comment #2
Diseree commentedI have same experience.
Disable 'Optimize JavaScript files' checkbox in performance section.
Then tinyMCE may be work.
Comment #3
yhager commentedThe workaround in comment #2 works for me as well.
But I wish it worked with JS compression enabled.
Subscribing.
Comment #4
tcaduto commentedI had this problem as well, and turned off the JS optimization, but now am getting other JS errors:
tinyMCE.importThemeLanguagePack is not a function
http://www.amsoftwaredesign.com/modules/tinymce/tinymce/jscripts/tiny_mc...
Line 1
o is not a constructor
http://www.amsoftwaredesign.com/modules/tinymce/tinymce/jscripts/tiny_mc...
Line 1
Anyone see this?
Drupal 6.2 with the current TinyMCE module and TinyMCE 3.x (stable)
the exact same setup works on a different 6.2 install that was not update, but installed fresh.
Comment #5
yhager commentedI hope it is ok that I change the subject, but it seems like this becomes a mix of a few issues.
Lets use this issue to keep track of usage of tinyMCE with "JS optimization" option enabled under 'admin/settings/performance'.
I have tested with or without the TinyMCE compressor, and the result is the same.
Comment #6
elkanaut commentedI have the same problem, this two errors happens when JS optimization enabled:
Also the collapsible fieldsets are not working. As I see Drupal 5 plugin has the same problem, and it happens with all versions of TinyMCE editor.
As soon as you turn off JS optimization everything works fine.
Comment #7
luti commentedI have JS Optimization turned off since I've installed Drupal 6.2, but still, as soon as I install TinyMCE module, I loose:
- splitted window for teaser and a body in node edit form (which otherwise works well)
- collapsable fields (which otherwise work well too)
- maybe something else I haven't noticed yet...
I've tried to turn JS Optimization on (when it is on, there is no TinyMCE, but normal text window only) and back off, without any success.
I also don't have a "switch to normal mode" (disable/enable toggle) option, even if I've enabled it in profiles.
I've also noticed there are buttons (images) in TinyMCE profile specification screen in 5.x, but only texts in 6.x... Is this by design, or due to the fact that something is broken?
Comment #8
keva commentedsubscribing
Comment #9
angsikod commentedsubscribing
Comment #10
Steve Dougherty commentedSubscribing
Comment #11
pulsar commentedsubscribing
Comment #12
jbergeron commentedsubscribing
Comment #13
jesepi commentedsubscribing
Comment #14
RobR commentedsubscribing
Comment #15
ianchan commentedsubscribing
Comment #16
katbailey commentedRegarding the disable/enable toggle link, see the separate issue (and patch) here: http://drupal.org/node/262231#comment-882684
Comment #17
pieter333 commentedsubscribing
Comment #18
mikebuck commentedSubscribing
Comment #19
loze commentedSubscribing
Comment #20
gsivorot commentedTemporary fix:
Turn off preprocessing for the tiny_mce js file in the Tiny MCE module:
Change this...
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce.js');
To this...
drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce.js', 'module', 'header', FALSE, TRUE, FALSE);
At least the other js files will be optimized.
Comment #21
greenskunk+1 Thank you gsivorot.
Thanks for looking at the API api.drupal.org!!!
Comment #22
bhuga commentedUnfortunately, there's no 'proper' way to fix this, as Drupal js aggregation puts aggregated js before all other js, which is unfortunate if you need to populate a variable before aggregated stuff is run, as is the case here.
This patch uses drupal_set_html_head to set variables for TinyMCE's .NET aggregation check. Works for me. You might need to edit the 'suffix' one; I have my web server doing compression and don't use that other stuff.
Comment #23
tlogan commentedsubscribing
Comment #24
janusman commentedsubscribing
Comment #25
giorgoskpatch from #22 seems to work
This incompatibility prevented other javascript components from working
when JS optimization was turned on
Comment #26
bhuga commentedGiorgosK,
Can you be more specific about what stopped working, and in what circumstances? Do you mean that the patch in #22 broke another module, and if so, which?
Comment #27
giorgoskNo @bhuga I just said that the patch works !! (at least for me)
but maybe I was not clear enough
The rest was a more general comment and a warning if people DON'T actually use this patch, which might be rephrased as follows
tinyMCE not being JS optimizable (subject of this issue) causes other modules to stop working when JS optimization is turned on !! (does it make sense ?)
Comment #28
cloxzime commentedI have replaced the code below in tinymce.admin.inc. The good news, the error is not appear anymore BUT the editor still NOT appear in Content > Page/Story textbox.
'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),
The next thing that blocked my abillity is, I am using Shared Hosting with cPanel. So that I have no privilege to use such command to install the patches as I am NOT able to access root server.
Could you please show me the right way.
Your help are greatly appreciated.
Thanks & regards,
cloxzime
Comment #29
bhuga commentedUpdating status based on Giorgosk's comments and no complaints on a thread with so many subs. Thanks for the clarification.
@cloxzime,
I don't think the change you've made is correct. You should probably revert that change and apply the patch.
You can patch files under cpanel directly if your host allows ssh. If they don't, you can still ftp your site down, apply the patch, and put it back up. You don't need any special access to patch the module; it should all be in your public_html folder.
If you can SSH, see http://drupal.org/patch/apply, which refers to core but works for modules just as well. Exact instructions will differ based on your OS if you need to use ftp, but google will have those instructions for you.
Comment #30
eriktoyra commentedHave you tried with disabling page compression and clearing the cache in the Performance settings [admin/settings/performance]? That did the trick for me when I had the same problem with a similiar setup.
Comment #31
nicoloye commented