Hello,

This is good to see that Drupal begin to provide nice solutions to easily manage bootstrap based themes.

However I noticed a problem with that module.

If you have some contents in tabs and you don't fill one, the website display an buggy empty tab.

As drupal offer the possibility to make a field required or not, I think this module should add a condition to test if the content is empty and, if yes, don't display the tab.

Regards,

Alex

Comments

IP Police’s picture

I'm also having trouble with this on my site.

IP Police’s picture

I think I found a temporary work around for this issue.

To fix, I created a textfield called "Null Value" with the default value "." and placed it in the display's bootstrap_fieldgroup_nav_item that contained the non-required item. Then I just used CSS to set this field to display: none;

Kinda a hack but it does work for now...

kelvinwong’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

I fix it by checking if item is empty.

Shevchuk’s picture

Issue summary: View changes
StatusFileSize
new1.3 KB

Converted patch above to a p1 patch as Drupal patch guide suggests. Other than that they are the same.

That patch didn't help me though, may be I experience a different issue (buggy empty tab when access to all its fields is restricted with Field Permissions module).

Shevchuk’s picture

Added access permission check, so that tab is not rendered when its #access attribute set to false.

mkhamash’s picture

Status: Needs review » Reviewed & tested by the community

The patch #5 does work, and I don't think there is a problem with the logic.

R-H’s picture

Patch 5 fixed my problem. Can we commit this?

davemybes’s picture

#5 worked for me. Thanks.

  • Commit 4212d6f on master by cha0s:
    Issue #2018503 by KelvinWong, Shevchuk: Hide tabs if the field content...

  • Commit 4212d6f on master, 7.x-1.x by cha0s:
    Issue #2018503 by KelvinWong, Shevchuk: Hide tabs if the field content...
cha0s’s picture

Thanks for the patch! It's committed in the 7.x-1.1 release. :)

cha0s’s picture

Status: Reviewed & tested by the community » Closed (fixed)
mas0h’s picture

Status: Closed (fixed) » Needs work

I'm using the latest version and facing that issue, empty tabs are showing, and it should be hidden.

cha0s’s picture

Status: Needs work » Postponed (maintainer needs more info)

You'll need to provide more information, I haven't been able to reproduce since.