Closed (works as designed)
Project:
Quick Tabs
Version:
6.x-2.0-rc5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2010 at 11:01 UTC
Updated:
25 Feb 2014 at 09:06 UTC
Jump to comment: Most recent
Comments
Comment #1
pasqualleHide empty tab works for any tab type, but the tab content must be really empty..
example:
'' <- this is empty string
'
<div></div>' or ' ' seems like empty, as nothing is displayed but it is not an empty string..Comment #2
thommyboy commentedHi,
that's what I hoped. But I do have an empty Block, no title, no body and still the Tab appears.
When using Views everything works fine...
I have to add that my block isn't a Views-block! It's just a manually set up block- maybe that's the problem?
Regards
Thomas
Comment #3
crystaldawn commentedThis is actually a bug in the module itself. I had this same exact problem. The problem is the way that it checks for an empty tab. Instead of checking whats actually in the DB, it instead checks the $contents variable which is the improper way to do this. It should be checking values in the db and not contents that could come from other modules (such as CCK fields). I was able to fix this by using the parsing_api module and putting this in the quicktabs.module file in the quicktabs_render() function on line 185. This is NOT the correct way to fix this problem, but it does show how to solve it if you just want it to work with the least amount of code tinkering. Again this is not the proper fix, but for my situation it worked just fine since all of my tabs that were showing up when empty were CCK fields.
Comment #4
gateway69 commentedhmm im having this issue, where i have 2 views with arguments, when a tab has no data in it , the div tags still show up and cause the tab to render still.. not sure how I can get around this, I put your code in as well and I get the same thing?
Comment #5
katbailey commentedI really don't see this as a Quicktabs bug - a decent patch might convince me otherwise, but in the meantime I'm closing this issue.
Comment #6
Binu Varghese commentedFirst off, after you create a quick tab instance, select the the option to "Hide empty tabs" (Make sure the ajax mode is not set).
Now, if the view is truly empty, the tab will gracefully disappear from the tabs. But, how to ensure that the views output is truly empty?
- Simply add a views "filter" setup for the entity you are trying to display set to "Is not empty (NOT NULL)".
Cheers!