In Internet Explorer 7 (may be and 6) don`t work multiple select & related features
See error on screenshot
string 1663
symbol 5
Error "attr(...)" - null or not object

CommentFileSizeAuthor
#7 ieworkaround.patch1.17 KBWim Leers
report.jpg63.43 KBandreypaa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andreypaa’s picture

"attr(...)" - is null or not object
Error in the following code

// Mirror the 'error' class from the original select.
    var classes = $('select.hierarchical-select-'+ hsid +'-original-select', this.context).attr('class').split(' '); <---- error in this line
    for (var i = 0; i < classes.length; i++) { // TODO: I'm sure this can be done cleaner!
      if (classes[i] == 'http://drupal.org/node/227739') {
        $('select.hierarchical-select-'+ hsid +'-select', this.context).addClass('error');
        break;
      }
    }
Wim Leers’s picture

Status: Active » Postponed (maintainer needs more info)

I did test in IE6, a similar error occurred there. I can't test in IE7 though, but I assumed at least one of the beta and RC testers did. Apparently that was a bad assumption.

Anyway, the code you're using shows that you're not using the 2.0 release, but HEAD. Thanks to you posting that piece of code, I noticed that my last commit (after the 2.0 release) was a bad one (that URL in the comparison is of course not correct). Please sync to HEAD again or install the 2.0 release and report back.

andreypaa’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Needs review

In file "hierarchical_select.js" about line 159 add line marked "+"

HierarchicalSelect.initialize = function() {
  for (var hsid in Drupal.settings.hierarchical_select.settings) {
+    if ( hsid == 'indexOf' ) { continue;  }
    // If multiple select is enabled, intialize the dropbox content array.
    if (this.setting(hsid, 'multiple')) {
     this.dropboxContent[hsid] = this.setting(hsid, 'initialDropboxLineagesSelections');
    }
andreypaa’s picture

The HEAD version is still needed to be add this line

if ( hsid == 'indexOf' ) { continue;  }
Wim Leers’s picture

Status: Needs review » Needs work

Care to explain what that does exactly? That's about the vagues one-liner I've ever seen…

Also, if you can, please create a proper patch: http://drupal.org/patch/create.

imclean’s picture

Title: IE6/IE7 support broken » In IE 7 don`t work multiple select & related features
Assigned: Wim Leers » andreypaa
Status: Fixed » Needs work

I'm having the same problem with the 2.0 release and IE 6 & 7. RC4 was fine. Firefox is fine.

Line: 178 (technically 177 but that's IE for you)
Char: 5
Error: 'attr(....)' is null or not an object
Code: 0

This is with Drupal 5.7, latest JQuery update etc. Let me know if you need any further information. I'll keep digging to see what else I can find out.

Edit: I added an alert(hsid) just before line 177. Not sure if this is related, but in IE this displays "indexOf" while in FF it gives the numbers 0 then 1 in seaparate alerts, presumably the IDs of the vocabularies I'm using.

Wim Leers’s picture

Title: In IE 7 don`t work multiple select & related features » IE6/IE7 support broken
Assigned: andreypaa » Wim Leers
Status: Needs work » Fixed
FileSize
1.17 KB

Reproduced on IE6. Work-around implemented, see patch.

imclean’s picture

Assigned: andreypaa » Unassigned

Works great, thanks for the quick response.

Wim Leers’s picture

Title: In IE 7 don`t work multiple select & related features » IE6/IE7 support broken
Assigned: Unassigned » Wim Leers
Status: Needs work » Fixed

Excellent :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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