When the module is enabled and used for ecommerce some internal links are incorrectly marked as external. This only occurs under IE7 when annomyous checkout is selected. For some reason the pattern matching fails to exclude URL marked as HTTPS as external links. I have created the following fix it (quick and dirty so it might need some work).

In the js file add the following line after the existing var $links line

var $links = $links.filter("a:not([@href^='" + Drupal.settings.extlink.baseUriHttps + "'])");

In the module change this line:

drupal_add_js(array('extlink' => array('extTarget' => variable_get('extlink_target', 0), 'extClass' => variable_get('extlink_class', 'ext'), 'baseUri' => 'http://' . $_SERVER['HTTP_HOST'])), 'setting');

to

drupal_add_js(array('extlink' => array('extTarget' => variable_get('extlink_target', 0), 'extClass' => variable_get('extlink_class', 'ext'), 'baseUri' => 'http://' . $_SERVER['HTTP_HOST'], 'baseUriHttps' => 'https://' . $_SERVER['HTTP_HOST'])), 'setting');

Comments

marcingy’s picture

Title: IE 7 https issue under ecommerce » IE 7 https issue when ecommerce is enabled and annoyomous checkout is used
quicksketch’s picture

Try the development version, where I believe the pattern matching is a little more accurate.

marcingy’s picture

I get the same issue with the dev version. and the patterns when I do the compare (without my patch) are exactly the same.

quicksketch’s picture

Ah yes I wasn't sure if they were different in any way. This fix is definitely necessary, but the implementation is clunky. Could we find a way to recognize https links without adding another variable?

marcingy’s picture

The code pass down just the domain and then the javascript could then be responsible for appending both the http and the https elements of the uri string before carrying out the pattern matching. I must admit I had an issue on our site which I had to fix and at the moment the patch is quick and dirty.

quicksketch’s picture

Status: Active » Fixed

As it turns out, passing in the host name is completely unnecessary, as it can be retrieved in javascript at window.location.host. I got rid of the variable entirely in the latest version (soon to be 1.2). Please let me know if it doesn't work correctly for your site. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)