The Administer link in the Admin menu does not expand properly in Internet Explorer version 8.

This makes the Admin 2 module virtually useless, since the user is unable to bring up the Administer sub-menus.

CommentFileSizeAuthor
#5 admin-825532-4.patch731 bytesc4rl

Comments

c4rl’s picture

Subscribing

sampeckham’s picture

Having the same problem in IE 8 (with and without compatibility mode). I've had it work randomly on one page though - can't figure why.

Got this error message from the browser though:

Webpage error details

Message: Object doesn't support this property or method
Line: 144
Char: 9
Code: 0
URI: http://www.****.***/sites/all/modules/admin/includes/admin.toolbar.js?8

Sam

sampeckham’s picture

More info but no solution I'm afraid.

I've noticed when I'm logged (IE 8 only) that this breaks another bit of Javascript on the page, jqgalscroll.js and the scrolling blocks just appear as a plain html list of blocks.

sampeckham’s picture

I love this module and the Tao/Rubik theme combo, and I know sensible designers and site admins use decent browsers, but this IE 8 probably is really frustrating as that's the browser my clients are using.

I've discovered this problem in a clean install of Drupal on a new server and seems to be easily replicated in every IE environment I've tried (7/8 Win XP/Vista etc).

I've narrowed it down to this function in the Admin module, but I'm no JS guru so a little help would be hugely appreciated.

Drupal.adminToolbar.getState = function(key) {
  if (!Drupal.adminToolbar.state) {
    Drupal.adminToolbar.state = {};
    var cookie = $.cookie('DrupalAdminToolbar');
    var query = cookie ? cookie.split('&') : [];
    if (query) {
      for (var i in query) {
        var values = query[i].split('=');
        if (values.length === 2) {
          Drupal.adminToolbar.state[values[0]] = values[1];
        }
      }
    }
  }
  return Drupal.adminToolbar.state[key] ? Drupal.adminToolbar.state[key] : false;
};

Is anyone else experiencing or looking at this problem?

Many thanks for any help.

Sam

c4rl’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new731 bytes

@sampeckham

I think IE doesn't like JS split() if the delimiter isn't found in the string. This one-line patch might solve the issue, but there may be other JS errors elsewhere.

//...
      for (var i in query) {
        if (query[i].indexOf('=') == -1) continue;
        var values = query[i].split('=');
//...
sampeckham’s picture

Many thanks for the patch. I'm getting mixed results.

In one scenario I have an identical copy of site each with a different theme, on one it works on the other it works on certain pages. Looking into it further I think your absolutely right about further JS errors, as I have a couple of extra bits of JS on the site that's not working too well on.

However, on a 3rd site which is a clean install with just views and CCK it's not working at all.

In each case the error reported by IE though is still the same, pointing to the same function as above, sometimes line 144 sometimes line 140. (For reference the code above is lines 137 through 153.)

Can anyone indicate whether this is strictly an IE flaw or is the code genuinely not quite right? I suspect the former, but in either case is it worth chasing and fixing?

Thanks c4rl for your time and help.

Wimmmmm’s picture

Same problem here!

IE8 does a one-time in opening submenu's & choosing an itme. To use the menu again, I have to log out & log in again...

mikejoconnor’s picture

Status: Needs review » Reviewed & tested by the community

I'm experiencing the same symptoms with ie8. The patch in comment #4 resolves this issue for me.

Anonymous’s picture

Assigned: Unassigned »
Anonymous’s picture

Assigned: » Unassigned

sorry, i douched up, unassigning...

nickvandervreken’s picture

Having the same problem in IE8, the patch in #5 did not help.

I'm also having a problem while activating the 'Administer' tab, sometimes this only seems to work when clicking on the right end of the tab. Event bubbling maybe?
Might be connected.

askibinski’s picture

Patch in #5 fixed the issue for me.

magnify’s picture

Same problem, patch in #5 didn't work. Subscribing.

mikepadiernos’s picture

I am encountering this problem as well and I noticed that when it is under the rubik / cube theme it works for me but I am using adaptivetheme as my non-admin theme I get the error.

mikepadiernos’s picture

I found out that if I manually enter the admin path the admin module seemed to work but if the path isn't admin, no matter what theme I used, ie8 gives that error. Also, whether I used the patch above or not the error is still at row 144 column 9 of admin.toolbar.js.

yhahn’s picture

Status: Reviewed & tested by the community » Fixed

Fix in #5 committed here: http://drupal.org/cvs?commit=400868. A variety of other IE-related fixes have been committed recently, so would love some more testing by people. Please file new tickets as you find problems.

Status: Fixed » Closed (fixed)

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