Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Using <base href=""> throws exception in tabs.js

#29

My site uses


<base href="http://mysite.com/" />

And so my anchors for my tabs are rendered like this


<a href="/folder/page.html#one">Tab One</a>
<a href="/folder/page.html#two">Tab Two</a>

When initializing the tabs, an error is thrown:

Control.Tabs: #page.htmlone was not found on the page.

Changing line 79 of tabs.js from


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('/').last().replace(/#/,'');

to


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last().replace(/#/,'');

Works for me. I'm not sure why the orig code wants to get the filename (that last split). In fact, I think this may work too:


link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last();

Apologies in advance if this is not thorough enough.

Reported by spingary · September 18th, 2008 @ 04:37 PM

State: resolved
Milestone: 1.0
Assigned to: Ryan Johnson Ryan Johnson

Activity

  1. Nathan L Smith
    Nathan L Smith
    • State changed from unconfirmed to confirmed

    May 19th, 2009 @ 09:46 AM

  2. Nathan L Smith
    Nathan L Smith
    • State changed from confirmed to resolved

    May 19th, 2009 @ 06:22 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.