If you add a header text under block or page settings, the header will display even if the table is empty. The check box "Display even if view has no result" found under the header text configuration does not work.

All my fields have "HIDE EMPTY COLUMN" checked in the flipped table format settings.

I believe this is related to the hide empty rows issue, and Make "Hide if empty" fully collapsible issue.

If all the fields in the table are empty, it looks like the view is still printed with an empty tbody tag. Therefore, the header is printed even though the table has no content.

How can we fix this? Let me know how to help.

Cheers,
eevensen

CommentFileSizeAuthor
#2 hide_empty_columns-2347247-2.patch875 byteskarlshea

Comments

eevensen’s picture

Priority: Normal » Major
karlshea’s picture

Title: Hide view header text when flipped table has no content » Respect "Hide Empty Column" setting for row
Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new875 bytes

Here's a patch against 7.x-1.x-dev that should fix the issue.

naught101’s picture

Hey Karl,
I'm not actively using drupal at the moment, and I don't even have a development environment set up, so I can't test this. The code looks neat though, and you've got some experience here. If you're using this module a bit, and are interested in helping maintain it, I'd be happy to give you commit access.

karlshea’s picture

Sure, I wouldn't mind. I'm going to be using it fairly extensively on a project I'm currently working on so I wouldn't mind getting through the issue queue a bit.

naught101’s picture

OK, you now have full permissions. Do your worst :)

If you're not auto-subscribed, it's probably a good idea to update your issue queue mail-out settings.

karlshea’s picture

It actually looks like my patch doesn't fix the original issue, and when I updated to the latest dev version my issue was fixed anyways.

karlshea’s picture

The included patch is fixing an issue I'm having, so I'll probably include it in the next development release. However, I'll also look into why the header is still displaying when the view has no results.

  • KarlShea committed a691042 on 7.x-1.x
    Issue #2347247 by KarlShea: Respect "Hide Empty Column" setting for row
    
karlshea’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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