I went through http://drupal.org/node/125650 and some other links to see the root cause of error in IE6 : "Internet Explorer Cannot Open the Internet Site- Operation Aborted". Having got the same error on my site (WAMP - xampp-localhost) I found that disabling 'Tabs' causes error to vanish in my case. I was able to reproduce the error when 'Tabs' was enabled again. I am using ad + imagefield + cck + fivestar + local wysiwyg editor module + jstools
It seems it needs same fix while using add_js. I suggest to review the existing code for this module in upcoming version w.r.t. this IE issue wiz related to DOM object modifications using javascript.

Comments

jdsaward’s picture

By scientific method (or was it trial and error?) I also confirmed that it is the tabs helper module that causes IE to abort. IE7. Using 5.x-0.8.

budda’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new6.84 KB

The crash happened because of code within a JS script called jquery.history_remote.min.js

What this script does it's what would be called a "hack"... under IE it requires making changes to the page (adding an invisible IFRAME). Normally, when you dynamically make changes to a page you're advised to do it inside an "onload" handler... otherwise things might go wrong. In practice things don't normally go wrong... except when Flash is around in which case you might or might not have problems (the reason why is hidden along with IE's source code). The thing is, "onload" is an event called after the whole page (and images) are loaded and rendered... which is overkill, because it'd be enough to wait until the DOM is loaded, no need to wait for images. Firefox provides a "dom loaded" event, but IE doesn't.

... enter the JQuery library, used by Drupal (and by the guilty script in particular), which provides a hook for Firefox's "dom loaded" event, and attempts to simulate it under IE (I'm talking about the $.ready function).

The Fix is in jquery.history_remote.js which is loaded by the tabs code for the permalink urls.

I have attached the fixed script.

Anonymous’s picture

Budda,
I've replaced my jquery.history_remote.pack.js file with your text file and while I no longer get the IE aborted error, tabs no longer work. Is there anyway I could just disable the history script from running? Tabs don't seem like something that really needs them to function.
Thanks!

nedjo’s picture

The D6 version of tabs doesn't have history. Yes, probably we should either remove it from D5 or else at least make it optional. I'd welcome a patch.

Anonymous’s picture

Budda,
I need to correct myself. Your patch didn't break the tabs, but by moving that iframe creation to window.onload, my script that was set to run ondomload ended up running too early. Moving my initiation script for the tabs to window.onload fixed the problem. Awesome!

Anonymous’s picture

Any tips on how to do this in the code? I see the javascript, I just can't get my head around what needs to be removed/made optional.

budda’s picture

@klamping - not sure what you're asking? What do you want to make optional?

Anonymous’s picture

I'd like to stop the history script from running altogether, since it's cause conflicts with my jquery photo carousel script. So I was wondering if there was anywhere I could just stop the call to that script from being made.

wmostrey’s picture

Here is what fixed the problem for me:

http://drupal.org/node/199524#comment-827965

Either use the altered jquery.history_remote.js (attached to that comment) or change the module and stop it from calling it altogether. The Drupal 6 version of the module doesn't use it anymore btw.

This bug really should be taken seriously by the maintainers of this module.

nedjo’s picture

This bug really should be taken seriously by the maintainers of this module.

I haven't reproduced the issue and so cannot fully test. Comment #3 reported that the patch broke tabs.

I'd welcome a patch with reviews.

wmostrey’s picture

The error happens when you combine this script with for instance reCAPTCHA or swfobject.js. You should be able to reproduce it when you enter one of those objects in your page.

wmostrey’s picture

Budda,

Your script fixes the "cannot open" error but it effectively breaks tabs. Do you know what else needs to be changed in order to get them working again?

wmostrey’s picture

Version: 5.x-0.8 » 5.x-1.1
StatusFileSize
new555 bytes

I can confirm this bug for 5.x-1.1 as well.

For better understanding I created a patch for #2's solution (patch for 0.8). All we need now is a way to figure out how to get tabs working again with this patch applied.

wim leers’s picture

So, in summary:
- no crash anymore when you use $(window).load instead of just $() (which is a synonym for $.ready), which caused it the history plugin to be loaded too early in IE6, in turn causing weird problems when combined with Flash on the same page
- the history is now being loaded later, but the tabs plugin isn't, which somehow causes it to fail. So we need to make sure the tabs plugin only loads *after* the history plugin has loaded.

How about:
- add an id attribute to the iframe that's being added by the history plugin
- don't load the tabs plugin until the aforementioned id is found

Seems the least hacky approach?

nmorse’s picture

So, I'm confused -- as I don't have a jsquery.history_remote.js -- I haae jsquery.history_remote.pack.js, which doesn't look anything like the patch. What am I missing?

wmostrey’s picture

Nick, the patch is for version 0.8 (which uses history_remove.js), not for version 1.1 (which uses history_remote.pack.js).

After more testing, it looks like my patch for #13 by itself fixes this issue without breaking tabs. It would be great if someone could confirm this.

sjs’s picture

I have the 1.1 version of jstools, so the above mentioned patch wasn't of much use. What did work for me was commenting out line 160 in tabs.module:
drupal_get_path('module', 'jstools') . '/jquery.history_remote.pack.js',

So far I haven't seen any side effects. Those parts of the site that use tabs work just like they did before and the error message is gone..

nedjo’s picture

Version: 5.x-1.1 » 5.x-1.x-dev
Status: Needs review » Fixed

I made the history remote plugin optional, defaulting to disabled.

wmostrey’s picture

Thanks so much for this Nedjo!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.