Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When viewing pages that have the TinyMCE editor attached to textareas, using the latest stable build of jQuery (as of now, 1.2.3) - this error occurs in Firebug:
$ is not defined - collapse.js
Causing the entire screen to become blank except for the Enable rich-text link.
Replacing jQuery with the Drupal version solves this, but unfortunately means less features which are needed. For now I have disabled the editor.
Here is the entire dump from Firebug:
$ is not defined
(no name)()collapse.js (line 56)
e([legend, legend, legend, 1 more...], function(), undefined)jquery.js (line 11)
e(function(), undefined)jquery.js (line 11)
(no name)()collapse.js (line 55)
e()jquery.js (line 11)
e()jquery.js (line 11)
e([function(), function(), function(), 4 more...], function(), undefined)jquery.js (line 11)
e()jquery.js (line 11)
[Break on this error] var fieldset = $(this.parentNode);
Note that this bug does not occur in IE7. (Haven't checked others)
Comment | File | Size | Author |
---|---|---|---|
#43 | javascript error on page.jpg | 57.01 KB | yogitha |
#21 | tinymce_jqupdate2.patch | 586 bytes | katbailey |
Comments
Comment #1
torgosPizzaEdited title to better reflect issue
Comment #2
jersu CreditAttribution: jersu commentedI'm having the same issue. I've had to downgrade back to jquery 1.1.2 to edit any node with tinymce. Would appreciate a workaround / fix.
This website says to load tinymce before jquery, but I don't really see how that is possible in drupal without breaking other stuff : http://brian.pontarelli.com/2007/09/12/how-to-get-jquery-and-tinymce-to-...
This tracking issue suggests there is a workaround involving a patch, but seems like there is no solid resolution to the issue : http://drupal.org/node/118747
Comment #3
torgosPizzaTo be honest, the only workaround I've found so far was to switch to fckeditor. Happier trails... but if TinyMCE gets fixed for the new jQuery I might consider going back.
Comment #4
mikl CreditAttribution: mikl commentedI have this problem as well. Does anyone have a clue as to why this happens. My JavaScript debugger tells me nothing helpful...
Comment #5
cbovard CreditAttribution: cbovard commentedsubscribing
Comment #6
TheRec CreditAttribution: TheRec commentedHello,
I have exactly the same issue. I would really appreciate any fix, I've been searching a lot but I didn't find anything to make it work in Firefox :
That is the only JS error I get from Firebug :
Another thing, this error only happens with a specific content type : "Webforms". I can edit every other content types (default and custom ones) with TinyMCE editor without any problem.
Maybe that issue should be reported for jQuery_update module too, since they usually try to maintain downward compatibility ?
What's odd is that it doesn't work only in Firefox (tried latest Firefox 2 and Firefox 3 beta 5), I also tested in IE6, IE7 and Opera and it works flawlessly in those :S
As temporary "fix" to edit those node, I just disable Javascript before clicking on "Edit".
Comment #7
hass CreditAttribution: hass commentedTry this #256285: jquery.js: Fix CVS ID, remove SVN tags, please
Comment #8
TheRec CreditAttribution: TheRec commentedI upgraded to jQuery 1.2.4 (http://jqueryjs.googlecode.com/files/jquery-1.2.4.pack.js), jquery_update shows the good version (1.2.4, no error in the Status report of Drupal) and I still get the same issue unfortunately. Oh and I use the jquery_update because were still talking about 5.x ... I'm not really sure about the support for 1.2.4 of jquery_update, this version has been released less than a day ago ;)
Comment #9
hass CreditAttribution: hass commentedOh, missed this is a D5 case.
Comment #10
sunJust wanna let you guys know that I have forked TinyMCE module into Wysiwyg Editor module with plenty of improvements (some of which have been in TinyMCE's queue for ages). I'll publish a first official release shortly, so you might want to track http://drupal.org/project/wysiwyg
This particular bug is already fixed in Wysiwyg Editor. The new module also imports your existing settings from TinyMCE.
Comment #11
hass CreditAttribution: hass commentedI'm very interested if this linked project will really become the D6 editor or if this is only a try...!?
Comment #12
sunThere will never be *the* editor for Drupal. Wysiwyg as well as Wysiwyg Editor are API modules, and the goal is to support any client-side script-based editor in the wild. For now, it supports TinyMCE. We'll work on abstracting the logic of the current module to support other editors, like FCKeditor, nicEdit, aso.
Comment #13
hass CreditAttribution: hass commentedI thought the plan is to integrate *a* basic WYSIWYG editor into core and not only an API... that's how i read Dries.
Comment #14
TheRec CreditAttribution: TheRec commentedSince you have fixed this bug in the fork, could you please give some clues (or even a patch) how to solve it within TinyMCE module ? I'll sure check the Wysiwyg Editor module (the idea behind it is excellent by the way, I can't wait to use the first official release), but I'd like to get this working for a site that will be published pretty soon (so using a -dev version isn't really a solution in this case). Thanks in advance !
Comment #15
sunI don't see a way to fix this in TinyMCE. So, go ahead, download the dev snapshot and check what's not working for you yet.
Comment #16
TheRec CreditAttribution: TheRec commentedSorry, I didn't mention it before... I tested with the dev snapshot of Wysiwyg module and it works fine, no blank screen.
I also tried the dev snapshot of TinyMCE module but unfortunately it doesn't work, I get a blank screen (except the "disable rich-text", as described before)... oh and in both cases the "tinymce" directory were the same (I mean, same version, 2.1.3, clean install) and the jQuery version was the same (of course if I don't update jQuery, with the jquery_update module it works in every case).
Comment #17
sunNice to hear. However, Wysiwyg Editor is a major re-write of TinyMCE module due to this patch #118747: Upgrade to jquery, improve obsolete js approaches, which actually also fixed this issue and has been in TinyMCE's queue for more than one year. If you look at http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tinymce/?pa... you'll see that the last commit for TinyMCE module was 1 year ago. If you look at length of TinyMCE's queue, you'll see that this project is currently unmaintained.
If you have tested another patch in TinyMCE's queue that works and fixes or improves something that is still missing in Wysiwyg Editor, feel free to move the issue holding that patch over to Wysiwyg's queue. However, please ensure that the issue actually exists also in Wysiwyg Editor first.
Comment #18
Andrew M Riley CreditAttribution: Andrew M Riley commentedThis isn't a long term fix but if you really need it working, in tinymce.module:
find
//settings are saved as strings, not booleans
if ($profile->settings['show_toggle'] == 'true') {
// Make sure to append to #suffix so it isn't completely overwritten
$element['#suffix'] .= $wysiwyg_link;
}
and comment it out
/*
//settings are saved as strings, not booleans
if ($profile->settings['show_toggle'] == 'true') {
// Make sure to append to #suffix so it isn't completely overwritten
$element['#suffix'] .= $wysiwyg_link;
}
*/
This will kill the ability for you to enable/disable tinymce on a form field by form field basis but at least I don't get the dreaded whitescreen with disable rich text string. I've verified this on Firefox 3, IE 6, IE7 with Drupal 5.7 with TinyMCE module 5.x-1.9.
Comment #19
katbailey CreditAttribution: katbailey commentedHi All,
it seems you can get this to work without forgoing the enable/disable functionality by using jQuery to append the enable/disable link instead of doing document.write. So, in tinymce.module replace line 187, i.e.
with
I've so far only had a chance to test this on a mac but I tried it with both the old and new versions of jQuery and it works fine.
Comment #20
TheRec CreditAttribution: TheRec commentedGreat one, it works fine in Firefox 2.0.0.14 and Firefox 3.0 RC2 and RC3 (all those weren't working before), still works in the other browsers I've mentioned in my previous messages :) Good thinking trying to use jQuery to do the job cleaner ! And you found it just 2 days before my customer's site has to be published (not that it would have prevented it, but anyways it's way easier like this). Thanks a lot.
Comment #21
katbailey CreditAttribution: katbailey commentedOK, here's a patch - I changed it slightly so that it uses .after() instead of .parent().append()
Also, tested it in IE6 and it works fine.
Comment #22
Nall CreditAttribution: Nall commentedPopped in the patch re #21, using tinyMCE 5.x-1.9 and jQuery 1.2.6, renders fine here. Definite +1, thanks.
Comment #23
juroon CreditAttribution: juroon commented#21 worked for me too. Phew, I was in a tight spot. Thanks!
Comment #24
Eugene Fidelin CreditAttribution: Eugene Fidelin commentedThanks for the patch! It works great even for old jquery versions!
Comment #25
armyofda12mnkeys CreditAttribution: armyofda12mnkeys commentedcool works for me, thanks!
Comment #26
chirale CreditAttribution: chirale commented#21 works fine with JQuery Update 5.x-2.0-rc1 (JQuery 1.2.6) and TinyMce 5.x-1.9 (under Drupal 5.8). Thanks. I hope this patch will be submitted soon.
Comment #27
ianchan CreditAttribution: ianchan commentedsubscribing - same issue for me.
Only the Webform and Project content types go to blank screen (with link to disable rich-text). If I disable toggle rich-text in the TinyMce settings or if I rollback jQuery, the problems go away. Will try patch in #21
Comment #28
tobiass CreditAttribution: tobiass commentedHi
Same issue for me.
As a workaround I just disabled tinymce on pages with user/* since I don't need TinyMCE for user profiles.
Comment #29
katbailey CreditAttribution: katbailey commentedJust in case it's not clear, this only happens when one of your textareas is in a collapsible fieldset, so for example if you're using Workflow module for content moderation you'll have a "comments" textarea within a collapsible fieldset and this causes tinymce to act up if you don't have the above patch.
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedI was having problem with Webforms edit screen.
Patch in #21 worked for me. Thanks!
Comment #31
sunFriends,
of course you can keep on posting here. However, it might be worth to have a look at the list of RTBC issues, which could have been committed to this module a long time ago.
See also comment #17 above.
Comment #32
AdrianB CreditAttribution: AdrianB commentedJust wanted to add to the observation in #29, about collapsible fieldsets. I too experienced this when using CCK to group fields together. Whenever I put an rich text area in a group (and thus in a collapsible fieldset) the error occurred in Firefox.
Re #31: Yes, it's a dead end, but your Wysiwyg module isn't ready yet, so until then we have to use the old TinyMCE module and "make it work". I tried Wysiwyg for a while but eventually switched back to TinyMCE because it works better for me (although not unmodified).
Comment #33
danbryant CreditAttribution: danbryant commentedSame idea but not jQuery based; Nothing against jQuery of course, its INCREDIBLE!
Additionally I've tracked this to a problem with cck. Somehow cck will spontaneously transform a single line text field (lines set to 1 in the field configuration) into a multiple line textarea. The text field is still set to be a single line but it show up as a textarea. I am able to get the text field to behave by setting the "lines" to 2, saving the field, re-editing it to set the lines to 1, saving it again (... pain in the A$$).
Comment #34
Shane Birley CreditAttribution: Shane Birley commented#21 worked for me.
Comment #35
emTque CreditAttribution: emTque commented#21 worked for me too. Thanks.
Any idea when this is going to be rolled into the devel version of the module?
Comment #36
katbailey CreditAttribution: katbailey commentedIt probably never will. This module is now defunct I think and WYSIWYG module has taken over from it. The patch should just be used as a stop-gap solution if for some reason you can't switch to WYSIWYG.
Comment #37
sun@Katherine: Thanks & btw: your jQuery know-how would be very welcome for taking Wysiwyg to the next stage! (i.e. supporting multiple editors and multiple editor versions)
@all: Repeating myself from #17:
If you have tested another patch in TinyMCE's queue that works and fixes or improves something that is still missing in Wysiwyg Editor, feel free to move the issue holding that patch over to Wysiwyg's queue.
However, please ensure that the issue actually still exists also in Wysiwyg Editor first.
Comment #38
robert_hanley CreditAttribution: robert_hanley commentedGreetings,
Thanks a bunch...I've been have a problem with this and the fix worked in:
ff 3.0.1
IE 7.0.5730.11 it opens the editor with
tages (athough this may be caused by some combination of settings I have);
Safari 3.1.2 (no tags when the editor opens); and
Opera 9.25.
Thanks again!
Comment #39
pcorbett CreditAttribution: pcorbett commented#21 Works for me, too. Thanks!
jquery 1.2.6
drupal 5.10
tinymce 5.x-1.9 / 2.1.0 (2-13-2007 release)
Comment #40
1kenthomas CreditAttribution: 1kenthomas commentedRunning jquery 1.2.6, TinyMCE 3.1.1/ module 5.x-1.9, encountered same problem. Not solved by patches above, rather, via http://drupal.org/node/234380. Which left me with nodewords incompatibility (http://drupal.org/node/249665) and admin/build/block incompatibility (turned off). FWIW.
Comment #41
zhangx1a0 CreditAttribution: zhangx1a0 commented#21 - This works for me! cool patch, thanks a lot :)
Comment #42
naderat CreditAttribution: naderat commentedThis patch (#21) fixed my problem. Thanks katbailey :-)
Comment #43
yogitha CreditAttribution: yogitha commentedHi,
For my site i am using drupal5.x version .
i installed timymce and followed install.txt file for installing and enable(in this format sites/all/modules/tinymce/tinymce) .
For me every thing is working fine but, i am getting JavaScript error on page in IE6 & IE7(and i am not getting javascript errors in browsers Mozilla &Y Netscape).
Plz have a look at the attached image.
Do any one know solution for this.
Comment #44
sunPlease have a look at the TinyMCE project page. Marking as won't fix.
Comment #45
melezhik CreditAttribution: melezhik commentedkatbailey
Thanks you a lot!!!
Yor solution pretty works for me, that's delisious
!!!
Comment #46
greenlite CreditAttribution: greenlite commentedPatch from #21 worked.
Incredible!
Comment #47
GaryA CreditAttribution: GaryA commentedThe Fix in #21 worked for me as well. With FireFox 3.07, Drupal 5.5, JSQuery 1.2.6 (JSQuery Update 2). Like others it worked before hand with IE 8.
Comment #48
null_pointer CreditAttribution: null_pointer commented#21.... cool! thk!
Comment #49
Adine CreditAttribution: Adine commentedThank you, you have just saved me so much time!
Comment #50
zcferres CreditAttribution: zcferres commented#21 worked for me as well.
Comment #51
cvbuelow CreditAttribution: cvbuelow commentedthanks #21 worked for me!