Choosing the "hide empty tabs" option results in possibilities of direct links being broken when tabs are hidden.

This is because if a tab is hidden, the index number of every tab that is rendered after it is reduced by one. Currently, direct links to tabs (linking to the page, and having that tab be in the active state) are based on the tab's index value. You see what I'm getting at...

To fix this, I'm attaching a patch that preserves the index value, but passes "NULL" as the tab's content. The tab is not rendered, but the index value is skipped, so it won't break all the other links that come after it in the index.

CommentFileSizeAuthor
#1 quicktabs.1003748.patch2.25 KBjessehs

Comments

jessehs’s picture

StatusFileSize
new2.25 KB

Here's the patch -- applied against 3.x-dev branch.

katbailey’s picture

Hmm, this is indeed a problem and one I never thought of before - sorry for not noticing your patch until now. It looks fine but I'm a little nervous about how it might interfere with the JavaScript's use of tab indices. Perhaps this won't have any repercussions at all but I'll need to test it to make sure.

katbailey’s picture

Status: Needs review » Fixed

OK, it did need a little bit extra to make sure the js worked properly, but committed - thanks!
http://drupalcode.org/project/quicktabs.git/commitdiff/9e8deace91720ca3d...

katbailey’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

Also committed a version of the patch to 7.x-3.x

Status: Fixed » Closed (fixed)
Issue tags: -6.x-3.0-release-blocker

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