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.
2008-Dec-28 6.x-3.x-dev
Whenever I go to comment, eg., site.com/comment/reply/x#comment-form -- I get the following javascript error in Internet Explorer (but not Firefox):
[code]Line 2
Char 1
Error: 'tinyMCE is undefined'
Code: 0
URL: http://www.site.com/comment/reply/xy/x[/code]
Nothing shows up on the page... but if I try to view the source I get:
So the above code is what is causing the error -- but only in IE 6 and IE 7 for some reason.
Comment | File | Size | Author |
---|---|---|---|
#25 | img_assist-DRUPAL-5--2.basePath.patch | 1.05 KB | sun |
Comments
Comment #1
Ryanbach CreditAttribution: Ryanbach commented<script type="text/javascript" src="/sites/all/modules/img_assist/drupalimage/langs/en.js?M"></script>
Comment #2
Ryanbach CreditAttribution: Ryanbach commented2008-Dec-28 6.x-3.x-dev
Whenever I go to comment, eg., site.com/comment/reply/x#comment-form -- I get the following javascript error in Internet Explorer (but not Firefox):
Nothing shows up on the page... but if I try to view the source I get:
<script type="text/javascript" src="/sites/all/modules/img_assist/drupalimage/langs/en.js?M"></script>
So the above code is what is causing the error -- but only in IE 6 and IE 7 for some reason.
Comment #3
Eric_A CreditAttribution: Eric_A commentedAs a workaround disabling the image assist icon (Textarea image link: Do not show a link) worked for me. (Wysiwyg API 6.x-0.5, Image Assist 6.x-2.x-dev, TinyMCE 3.2.1.1).
EDIT: this issue occurred when both the TinyMCE Image Assist plugin and the Image Assist Icon were activated. Disabling the plugin is another workaround :-)
Perhaps related to #204702: JavaScript errors due to global function name clashes
http://drupal.org/node/204702#comment-681311
Comment #4
travismiller CreditAttribution: travismiller commentedThis seems to be the breaking point:
img_assist/drupalimage/editor_plugin.js:6
commenting that line remedies the problem for me in at least IE6, even with TinyMCE Image Assist plugin and the Image Assist Icon activated.
i don't really understand the internals of tinymce, but it seems as though loading the language pack causes the plugin to not finish being created.
Comment #5
sunAs far as 6.x-3.x is concerned, please update to the latest development snapshot. At least the issue mentioned in the last follow-up is fixed in there. All others should equally report back whether the issue has been fixed.
That said, 6.x-3.x is considered experimental. If you do not want to help in development and rather want to be on the safe side, I highly recommend using Image Assist 6.x-2.x, which is also compatible to Wysiwyg API, but will only see patches and improvements that are heavily tested and known to work. 6.x-3.x instead has been created to allow a faster development and integration speed between Image Assist and Wysiwyg API.
Comment #6
sunI added a bold notice to the project, and also want to point to the special release notes in this issue: http://drupal.org/node/94930
That said, downgrading to 6.x-2.x should - as of now - be possible without any conflicts.
Comment #7
trofimchouk CreditAttribution: trofimchouk commentedThe same issue with 5.x-2.x-dev(2008-Dec-28). And the same solution.
Comment #8
Eric_A CreditAttribution: Eric_A commentedI tried 3.x. Same problem.
And somehow my workaround from #3 broke. (both 2.x. and 3.x) Unfortunately I'm not sure what has changed.
Drupal 6.8
Image/ Image Attach 6.x-1.0-alpha3
MS Internet Explorer 7
(2.x is in my sites/all/modules/ and 3.x in sites/example.com/modules/)
Comment #9
igorik CreditAttribution: igorik commentedSame problem, no workaround from above works for me.
I had to disable img_assist button inside tinymce.
latest img_assist 2.x
Igorik
Comment #10
stopbox CreditAttribution: stopbox commentedSolution in #4 solved the problem for me using IE7 (I had to delete the IE cache first).
Comment #11
kevinquillen CreditAttribution: kevinquillen commentedSame here. #4 corrected it in IE. Thanks.
Comment #12
sunIs it possible that you configured a different language than English in the wysiwyg profile for TinyMCE? Does this bug also occur if you configure English as language?
Comment #13
grunthus CreditAttribution: grunthus commented6.x-0.5
Hi, I have discovered that my site has the same problem in IE7 (and in IE8 in Windows beta 7). The problem does not manifest under Firefox 3 with either Linux or Windows.
Fix #4 DID work in IE8 (not able to check 7 yet), although as mentioned above, clearing the cache is essential.
I can confirm that I do have 'en' set as the language in admin/settings/wysiwyg/profile
Will test in IE6 with wine later tonight.
Edit page never finishes loading, source shows:
Thanks
Comment #14
grunthus CreditAttribution: grunthus commentedOK, with IE6 running under wine, the page errors on edit:
Line 2
Char 1
Error: 'tinyMCE is undefined'
Code: 0
URL: node/x/edit
Applying fix #4 and CLEARING the cache does the job in IE6.
Comment #15
paulmckibbenI also am experiencing this same problem in Image Assist 6.x-2.x-dev, in both IE 6 and IE 7. Workaround #4 above helps, but without the language pack, the tooltip text for the image assist button reads "img_assist.desc", which would probably confuse my users.
To make it a little better, instead of commenting that line, I changed the code as follows:
That way, other browsers will still load the language pack.
Comment #16
selfuntitled CreditAttribution: selfuntitled commentedI've got the same issue with 5.x-2.0-alpha1
The fix in post #4 also appears to work as well.
Comment #17
selfuntitled CreditAttribution: selfuntitled commentedSorry, didn't mean to change versions for this entire thread!
Comment #18
ergophobe CreditAttribution: ergophobe commentedSame problem here
IE7
Wysiwyg 6.x-1.x-dev from 25 Dec 2008
img_assist 6.x-1.x-dev from 19 Jan 2009
The solution from #4 works for me, but as mentioned in #15, I would like the button to have the correct label. Since the requireLanguagePack call fails and locks everything up and since I only want English labels, I just put the addI18n call straight into the editor_plugin.js file right after the line commented out in #4.
So now it looks like this
// tinymce.PluginManager.requireLangPack('img_assist');
tinyMCE.addI18n('en.img_assist', {
desc : 'Insert or update an embedded image.'
});
Or to put it as a patch
5c5
< tinymce.PluginManager.requireLangPack('img_assist');
---
> // tinymce.PluginManager.requireLangPack('img_assist');
5a7,9
> tinyMCE.addI18n('en.img_assist', {
> desc : 'Insert or update an embedded image.'
> });
Comment #19
mcload CreditAttribution: mcload commentedExperiencing the same problem. Firefox works, but IE7 is broken.
Comment #20
sunWhat happens if we replace "tinyMCE" with "tinymce" in the language JavaScript files?
Comment #21
wouter99999 CreditAttribution: wouter99999 commentedI had the same problem with Drupal 5 and Image assist 5.x-2.0alpha1. Solution #4 worked for me (I had to make the change in both editor_plugin.js and editor_plugin_src.js). But now there is a new problem: when the image assist popup window opens I get a javascript error: 'Drupal.settings.basePath' is null or not an object. As far as I know 'Drupal.settings.basePath' does not even exist in Drupal 5?
Comment #22
monotaga CreditAttribution: monotaga commentedsubscribing
Comment #23
ngmaloney CreditAttribution: ngmaloney commentedI experienced the same problem as #21 wouter99999. Using D5 and tested with img_assist-5.x-2.x-dev and img_assist-5.x-2.0alpha1.
As an experiment I removed the Drupal.settings.basePath references from img_assist_tinymce.js and img_assist_popup.js and it worked. In Firebug console I am able to access the "Drupal.settings.basePath" variable for the calling page so the var does exist. Is it a JS scoping issue with the popup/iframe not getting access to the Drupal.settings var?
Comment #24
ngmaloney CreditAttribution: ngmaloney commentedI dug further into the issue. The Drupal global JS variable in the img_assist tinymce popup window contains significantly less variables than that on a standard page. Amongst the missing variables is Drupal.settings.basePath. As a crude work around I attempted the following which seems to resolve all problems.
On img_assist_tinymce.js add the following right after line 19:
That is assuming your basePath is "/". Any suggestions on how to get the parent window Drupal JS variables into the scope of the Popups would be greatly appreciated.
I'm running the following:
- Drupal 5.16dev
- Wysiwyg API 5.x-0.5
- Image Assist 5.x-2.x-dev (2009-Jan-18)
Comment #25
sunFinally some insight that allows me to provide a patch for this issue. Thanks, ngmaloney.
Comment #26
wouter99999 CreditAttribution: wouter99999 commentedThanks sun, the patch worked for me.
Comment #27
sunI have committed the patch in #25, which fixes the "Drupal.settings.basePath undefined" bug.
The original bug of this issue is mostly resolved as well, but needs to be fixed in Wysiwyg API: #352938: TinyMCE 3: IE6: Memory leak with Forecolor button
Comment #28
ngmaloney CreditAttribution: ngmaloney commentedIf anyone continues to experience "Blank Pages on IE" when using img_assist, wysiwyg and tinymce using D5 it appears to be an issue with WYSIWYG API Version 5.x-0.5. Upgrading to WYSIWYG 5.x-2.x-dev seems to resolve any problems.
Comment #29
mcload CreditAttribution: mcload commentedHow about D6?
Comment #30
ergophobe CreditAttribution: ergophobe commentedI did upgrade img_assist, wysiwyg, ctools etc last night and it worked fine in FF, but in IE I didn't get a camera icon in tinyMCE. No time to poke around just now though.
Comment #31
ergophobe CreditAttribution: ergophobe commentedOkay, upgraded to the Feb 12 dev snapshots of Image Assist 3 and Wysiwyg 2 - everything seems to work great.
Thanks!
Comment #32
ngmaloney CreditAttribution: ngmaloney commented@mcload - I believe I ran into the same problem with D6. Try running the latest Dev release of the WYSIWYG API module.
Comment #33
progesterone CreditAttribution: progesterone commentedI solved this way.
1. Follow the step in http://www.webopius.com/content/196/fix-for-tinymce-is-undefined-error-i... which is the same as in comment #18.
2. Clear the cache
Close IE and re-open it. Go to Tools >> Internet Options >> Delete Files >> Check "Delete all offline content (I'm not sure this check is compulsory but I did check) and press OK