JavaScript errors due to global function name clashes

bboyjay - December 29, 2007 - 19:14
Project:Image Assist
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Collapsible feildsets stop working in IE7 when img_assist is enabled.

This problem use to exist in IE6, but does not anymore.

AttachmentSize
img_assist-enabled-ie7-fieldsets.jpg - When img_assist is enabled15.82 KB
img_assist-disabled-ie7-fieldsets.jpg - When img_assist is disabled20.55 KB

#1

bboyjay - December 29, 2007 - 19:17
Title:Collapsible feildsets stop working in IE7» Collapsible fieldsets stop working in IE7

#2

bboyjay - December 31, 2007 - 04:33

Does anyone else have this problem?

#3

apratt - January 3, 2008 - 13:20

I'm seeing it too. 5.x-1.5 though.

#4

apratt - January 3, 2008 - 14:47

I seem to have resolved this by using only the camera icon in TinyMCE to add images. By removing the icon or text link from below the body area - the collapsible fieldsets come back. There is a comment in the module file itself about the complexity of the CSS and javascript involved that led me to think this might be part of the issue.

#5

zoo33 - January 6, 2008 - 23:15

What I think would be very helpful is if you could find some kind of JS console in IE 7 and see if it spits out any errors.

#6

sun - January 7, 2008 - 00:23
Title:Collapsible fieldsets stop working in IE7» JavaScript errors due to global function name clashes

That's probably true - if both img_assist_textarea.js and img_assist_tinymce.js are loaded, initLoader() and some more (global) JavaScript functions are declared twice. Major rewrite needed. Probably best by re-factoring all JS code based on jQuery.

As a workaround, you should disable the button below textareas in Image Assist's settings (as already mentioned in #4).

Great input, Hannes!

#7

Justin Freeman - March 19, 2008 - 01:20
Priority:normal» critical

Adding my name to the list. We have seen this problem in production for IE7 users (fine in Fire Fox) and the only workaround we could find was to configure Image assist as follows (admin/settings/img_assist):
1. Display Image assist on paths: on specific paths. Leave the options blank.
2. Display Image assist on text areas: Show on only the listed textareas. Leave the options blank.
3. Textarea image link: Do not show a link.

Then this problem goes away for IE7. Would be great to have this one fixed.

 
 

Drupal is a registered trademark of Dries Buytaert.