I don't have any 'Empty Text' and my view query returns 0 results. However the title of my Panel Pane is still appearing. Is there a way to get the title to not appear when there are no results? I thought this would be the default behavior, but it does not appear to be.

Thanks.

Comments

actuan’s picture

I'm having the same problem. I think part of what's happening is that the panel actually contains formatting data though it doesn't have results from the view. Anyone have advice on code that will prevent a pane from displaying if the view which provides the data has no results. The code should be based on the number of items in the view rather than the content of the pane.

Thanks!

KingMoore’s picture

Category: support » bug

Since someone else is having this problem (Not just me!) then I feel better marking this as a bug for now.

dawehner’s picture

Could you try to reproduce it with the newest version of views?
If it does work there, be free to close the issue. Thanks!

m_z’s picture

I'm using not the latest views version (2.6), but in the relase notes for 2.7 and 2.8 I couldn't find changes regarding this issue.
I have this problem in combinations with Panels 3.x

To reproduce it:
- build a view
- create a panel page where you insert this view as a view content pane
- set style to rounded corners for this pane
- save and look at your created panel page

- now change your view (add some filters so that 0 lines are returned)
- look at the panel page again and see a rounded corner pane without any content

If someone will solve this issue (so that empty view is resulting in an undisplayed pane), please let us know your used versions of Views and Panels or what do you changed.

One possible workaround could be a visibility rule for that pane, but this leads to an additional SQL query :-(

dawehner’s picture

Status: Active » Fixed

Thats somehow a feature/bug from panels. You can use panels-pane.tpl.php and check whether $content is empty or not.

m_z’s picture

@dereine: Thank you for your advice. This will save some hours of working ;-)

Status: Fixed » Closed (fixed)

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