When a Page view is generated that results in no items found, the "Empty Text" is displayed. When this occurs, however, the text in the Header portion of the Page View is not displayed.
I believe this is a bug - the header is something that should always be displayed for the view (so as to explain what the page is showing and what should be expected) even when criteria is specified such that No items are found and the Empty Text message is displayed.
I've attached a text file of the Views Export code where I'm noticing the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| Views Export Bug-report | 2.58 KB | hintbw |
Comments
Comment #1
merlinofchaos commentedActually, this is the intended behavior. I realized later it's not fully adequate, but no real fix has ever been in. But there are definitely situations where the header + empty text does not make sense; and usually, the empty text can include the header information itself.
Comment #2
kc1981 commentedIf you use the Calendar view provided by the Calendar module, if no results are returned, then the empty text is not shown, either.
With the current design, it doesn't seem possible to have a header for a Calendar that has no items.
A simple fix for now would be to comment out the
if ($num_nodes) {statement on/around line 1543 in function theme_views_view() so that$output .= views_get_textarea($view, $type, 'header');always evaluates.