This time around I'm using panels module in far more places on my website.
However firebug spits out following error:

$("a[@href*=\"" + fragment + "\"]").parent().parent().parent().attr("id") is undefined
[Break on this error] .attr('id')
panels_tabs.js (line 72)

and

invalid 'in' operand this._sandBox
[Break on this error] if (!("FindProxyForURL" in this._sandBox))
nsProxyA...Config.js (line 95)

it doesn't seem too big of a deal because I only see these errors if i enable 'console' part of firebug. I'd still like to know what the problem might be. you can check it out at www.thehvoice.com

thanks

Comments

bgm’s picture

I have run into this error as well. I have fixed it by adding the check below. I am not familiar enough with javascript/jquery, but I have the feeling that it's just fixing a consequence of the bug, not the bug itself.

    // Update all links on load (automatically find the name of the tabset!).
    var currentURI = "" + window.location;
    if (currentURI.indexOf('#') != -1) {  // <- THIS
      var fragment = currentURI.substr(currentURI.indexOf('#'));
      var id = $('a[@href*="'+ fragment +'"]')
      .parent() // the parent li
      .parent() // the parent ul
      .parent() // the parent div (the actual tabset div!)
      .attr('id')
      .substr("tabs-".length);
      updateLinks(id, fragment);
    }

Otherwise, the jquery selector seems to fall on some random item (fragments equals "|", no idea why), then cannot find its parent correctly.

I was using this on a panel page with a views_slideshow, so the js error was causing other js stuff to not run correctly.

mathieu

kkrgopalan’s picture

The problem seems to because the javascript code expects the #tabname to be returned by the currentURI. If you open a tab in a new window/page you will not see this error ( because #tabname ) will be part of the currentURI ( window.location ).

Does anyone know how we can get the location.hash if the #tabname is on the same page ( as its the case when using panel tabs )?

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

Is this still a problem?

rgraves’s picture

I experienced this problem using panels_tabs 6.x-1.x-dev. Internet Explorer was producing javascript errors. The fix from #1 worked for me.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I somehow failed to see that this issue is a duplicate of another one. Please see http://drupal.org/node/296373 for the latest patch, test it, and I'll commit it!