Updated: Comment #87

Problem/Motivation

Views with no result sets were not being displayed. An option to "Display even if view has no result" was available but not being checked by the views handler.

Proposed resolution

The view handler now provides a filtered output string with results OR an empty string if "display no results" is selected.

Remaining tasks

CommentFileSizeAuthor
#122 views-1217394-122.patch5.16 KBskylord
#115 views-1217394-115.patch5.84 KBMustangGB
#110 views-1217394-110.patch5.8 KBMustangGB
#108 views-1217394-108.patch5.79 KBMustangGB
#104 views-1217394-104.patch5.82 KBgreggadsdon
#96 views-1217394-93.patch6.44 KBsachin.bansal
#93 views-1217394-92.patch6.44 KBOnkelTem
#81 views-display_even_if_no_results-1217394-D7.patch562 bytesAaronBauman
#77 1217394-77.patch10.52 KBdamiankloip
#77 interdiff-1217394-77.txt1003 bytesdamiankloip
#72 display_empty-1217394-72.patch10.46 KBdawehner
#72 interdiff.txt2.71 KBdawehner
#70 block-1217394-70.patch10.3 KBdawehner
#70 interdiff.txt593 bytesdawehner
#67 vdc-1217394-67.patch10.42 KBdawehner
#64 vdc-1217394-64.patch10.44 KBdawehner
#64 interdiff.txt1.73 KBdawehner
#60 vdc-1217394-60.patch10.32 KBdawehner
#57 drupal-1217394-52.patch10.32 KBdawehner
#57 interdiff.txt2.13 KBdawehner
#53 view_empty-1217394-FAIL.patch4.03 KBdawehner
#52 drupal-1217394-52.patch10.32 KBdawehner
#52 interdiff.txt584 bytesdawehner
#50 drupal-1217394-50.patch10.38 KBdawehner
#46 drupal-1217394-46.patch11.04 KBdawehner
#44 drupal-1217394-44.patch11 KBdawehner
#40 drupal-1217394-40.patch10.39 KBdawehner
#36 drupal-1217394-36.patch10.35 KBdawehner
#33 views-header-display-if-no-result.patch780 bytesrutcreate
#17 1217394-view-empty.patch6.49 KBdawehner
#16 1217394-view-empty.patch3.66 KBdawehner
#12 1217394-display-even-if-no-results-views.inc_.patch2.4 KBjsacksick
#10 1217394-display-even-if-no-results-views-panes.inc_.patch1.24 KBMichaelCole
#8 1217394-display-even-if-no-results-views-panes.inc_.patch1.38 KBjsacksick
Screenshot.png35.28 KBrogical
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Are you really sure that there is no result?

Perhaps you have missed some filter configuration.

rogical’s picture

I want it display even no results, so however any filter configuration, if no results it should also display, right?

but when I put the views block into panels, the header/footer doesn't display.

dawehner’s picture

Project: Views (for Drupal 7) » Chaos Tool Suite (ctools)
Version: 7.x-3.0-rc1 » 7.x-1.x-dev

Then this seems to be a bug of ctools

merlinofchaos’s picture

Project: Chaos Tool Suite (ctools) » Views (for Drupal 7)
Version: 7.x-1.x-dev » 7.x-3.x-dev

No this isn't actually CTools' fault, not precisely.

In blocks, you need an empty text. Putting   in is probably enough. Unfortunately it's not smart enough to realize that the 'header' or 'footer' displaying is enough to trigger the block to appear. That's...a difficulty in Views right now.

arski’s picture

sub. have the same issue in the latest 6.x release.

dawehner’s picture

What about adding a $view->not_empty or $view->always_render so it can be forced and just need to be checked here.

m3n0R’s picture

Here the same issue!

Subscribe +1

jsacksick’s picture

What about loop over header and footer elements and check if the empty option is checked ?
Here is the proposed patch.

Edit : Must be in ctools issues and the patch should be resent.
See #1245202: Views content pane empty even if "Display even if view has no result" is checked for views header/footer

dawehner’s picture

Project: Views (for Drupal 7) » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: User interface » Views Content
Status: Active » Needs review

Move to ctools issue queue as this patch is against ctools. Update status.

MichaelCole’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.24 KB

This is exactly what I needed when mixing Page Manager with Views.

The patch was edited to apply to ctools dir, instead of www.

MichaelCole’s picture

This does not work when adding View:Master as a panel.
This does work when adding View:Content pane as a panel.

jsacksick’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.4 KB

This new patch should work for the view master too. It's a simply copy/paste from views_pane.inc to views.inc

merlinofchaos’s picture

I really think we need a better way in Views to find that information so that we don't have to hardcode digging into structures like that. Let's find an issue in Views and mark this dependent upon it. Or at least say so since our tracking system doesn't do dependencies.

develpr’s picture

using normal view.
I checked "Display even if view has no result" but text not showing if there is no record..

filter conditions:
published : yes
content: type (reviews)

not working. It shows empty page not that text which I write into the Header(global textarea).

merlinofchaos’s picture

Project: Chaos Tool Suite (ctools) » Views (for Drupal 7)
Version: 7.x-1.x-dev » 7.x-3.x-dev
Component: Views Content » Code
Assigned: Unassigned » dawehner
Priority: Normal » Major

Kicking this back to Views and assigning to dereine. Let's talk about an API in Views that we can use to put this annoying issue to bed.

dawehner’s picture

FileSize
3.66 KB

So here is some code in views.

This currently doesn't handle the part in block.
What should be the default, or should it not change and has some configuration.

dawehner’s picture

FileSize
6.49 KB

Just tracking some work on the block part at 4am.

tim.plunkett’s picture

Triggering the testbot.

Status: Needs review » Needs work

The last submitted patch, 1217394-view-empty.patch, failed testing.

sgb9809’s picture

I am having opposite problem as OP - I leave the checkbox unchecked, so in theory if there are no results the header should NOT display, but even in my views where I am certain there are no results, the header is always shown. The only time the header does not display is when my contextual filter does not pass the filter criteria. If the contextual filter passes, even when the fields being queried are empty, the header is displayed. I'm guessing this is not a desired feature. Is there any way around this?

sgb9809’s picture

Nevermind, found a solution by adding filters to prevent null rows.

"There is no way for Views to tell if all fields in a row have no results (I know, this seems counter intuitive but it's true). You need to add filters to your view to prevent null rows for showing up."

areikiera’s picture

@sgb9809,

I'm having trouble figuring out how to follow the suggested solution in comment #21. Could you (or someone) describe how you accomplished this?

I'm guessing you added a Contextual Filter 'Global: Null', but I can't figure out how to configure it.

Thanks!

EDIT: Nevermind. I was way off above, trying to add a contextual filter. I added a standard filter for the field I was using, and set it to "Is not empty (NOT NULL)". It was a little confusing since I was using a relationship for a nodereference field, and thought it had to be more complicated than that, but just had to select the relationship in the filter, and voila! Thanks for the info!

bryancasler’s picture

Looks like I created a duplicate post.
#1554792: Empty view outputs <div></div>

...Here is my contribution...

I have a view that outputs the current node's body. The problem I'm running into is that even when the body is empty the "No results text" is ignored and instead an empty

is being included.

Views Export: http://pastebin.com/veCZAG0j

Screenshot of Views Settings: http://snpr.cm/vaZGM9.png
Screenshot of Display Suite Settings: http://www.diigo.com/item/image/1ks4o/r2b1?size=o
Screenshot of Panels Setting: http://snpr.cm/nLq12u.png
Screenshot of Node Body: http://snpr.cm/JM5Ogh.png
Screenshot of Views Output HTML: http://snpr.cm/pr89yR.png

dawehner’s picture

Status: Needs work » Needs review

#17: 1217394-view-empty.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1217394-view-empty.patch, failed testing.

dagmar’s picture

Assigned: dawehner » dagmar

I will try to fix this. I think I think dawhener won't be bothered :)

elly’s picture

Same problem here. Is there any workaround for the interim?

dagmar’s picture

Assigned: dagmar » Unassigned

Sorry I haven't time to work on this at this moment.

dasjo’s picture

just encountered this bug when using a search api view

igget76’s picture

I have the same problem. I'm using panels with a views pane. When checking "Show the empty text in the table", my panels page shows this error messagen:

Notice: Undefined variable: row_classes in include() (line 38 of /var/www/www.example.com/sites/all/modules/views/theme/views-view-table.tpl.php).

The view displays correctly in the preview.

rodp’s picture

Answer 21 above worked for me. If your filter is something like FieldFoo contains %some_string%, just AND another filter that says FieldFoo is not empty (not null). I'm using Drupal 6 block views inside of QuickTabs, and both the Display Header Even If No Results option and the Empty Text values started working after I added this. Whew! Thanks sgb9809.

sergeysynergy’s picture

++ to #21

rutcreate’s picture

Status: Needs work » Needs review
FileSize
780 bytes

This is a patch for block display even if no result for header and footer area.

Slacky08’s picture

Patch in #33 worked for me! (Drupal 7.15 / Views 7.x-3.5)

dawehner’s picture

But #33 is simply wrong compared to the previous approaches.

dawehner’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Issue tags: +VDC
FileSize
10.35 KB

Let's get something done for d8.

dawehner’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.x-dev
Component: Code » views.module

This should be core

ankit.goyal5’s picture

In Views basic settings/empty text is there.

In that we can write the content that has to come when views give no result. even with content format option you can write PHP code also. I tried this in drupal 6, working perfect.

Thanks

dawehner’s picture

@ankit.goyal5
Yeah this is about hiding the block, if there is no result.

dawehner’s picture

FileSize
10.39 KB

Rerolled.

oresh’s picture

Issue tags: -VDC

#40: drupal-1217394-40.patch queued for re-testing.

damiankloip’s picture

#40: drupal-1217394-40.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +VDC

The last submitted patch, drupal-1217394-40.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
11 KB

Let's rerole it.

Status: Needs review » Needs work

The last submitted patch, drupal-1217394-44.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
11.04 KB

Just another one.

Status: Needs review » Needs work
Issue tags: -VDC

The last submitted patch, drupal-1217394-46.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review

#46: drupal-1217394-46.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +VDC

The last submitted patch, drupal-1217394-46.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
10.38 KB

That happens if you show a random amount of people some features of phpstorm.

bdone’s picture

Tagging for an issue summary.

http://drupal.org/node/1427826 has instructions for adding/updating an issue summary.

dawehner’s picture

FileSize
584 bytes
10.32 KB

Let's get this in, please.

dawehner’s picture

Uploading a patch with just the test.

Status: Needs review » Needs work
Issue tags: -Needs issue summary update, -VDC

The last submitted patch, view_empty-1217394-FAIL.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
Issue tags: +Needs issue summary update, +VDC

#52: drupal-1217394-52.patch queued for re-testing.

damiankloip’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.phpundefined
@@ -161,6 +161,19 @@ public function preRender(array $results) {
+  public function isEmpty() {

We should implement usage of this on the other area handlers, then we can change the if (!$empty || !empty($this->options['empty'])) { ... parts. I'm just thinking, maybe a isNotEmpty method would be nice to read for this too?

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.phpundefined
@@ -2670,6 +2670,31 @@ public function isIdentifierUnique($id, $identifier) {
+  * Does the view shows anything.

'Returns whether the view has any rendered output' maybe? Also, maybe the second part could say 'This checks the view result, header, footer, and empty regions' or similar instead.

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.phpundefined
@@ -2670,6 +2670,31 @@ public function isIdentifierUnique($id, $identifier) {
+  *   Returns TRUE if the output is empty, else FALSE.

I like the 'FALSE otherwise' but sure, this is personal preference.

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.phpundefined
@@ -2670,6 +2670,31 @@ public function isIdentifierUnique($id, $identifier) {
+       $empty &= $handler->isEmpty();

Why do we need the reference here?

+++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_empty.ymlundefined
@@ -0,0 +1,44 @@
+human_name: ''

label

dawehner’s picture

Status: Needs work » Needs review
FileSize
2.13 KB
10.32 KB

We should implement usage of this on the other area handlers, then we can change the if (!$empty || !empty($this->options['empty'])) { ... parts. I'm just thinking, maybe a isNotEmpty method would be nice to read for this too?

Yeah I am not really sure how to improve the code, as the rendering of headers/footers have to be asked for, in order to determine whether the output of the area handler is really empty.

Why do we need the reference here?

This is not a reference, but a logical AND.

Status: Needs review » Needs work

The last submitted patch, drupal-1217394-52.patch, failed testing.

olli’s picture

Looks like you uploaded #52 again?

dawehner’s picture

Status: Needs work » Needs review
FileSize
10.32 KB

Status: Needs review » Needs work

The last submitted patch, vdc-1217394-60.patch, failed testing.

olli’s picture

Hmm, improvements from interdiff #57 are not in the patch #60.

+++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
@@ -42,6 +42,7 @@ protected function defineOptions() {
+    $options['block_hide_empty'] = array('default' => FALSE);

So by default, show the block even if it's empty, correct?

+++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
@@ -53,7 +54,7 @@ public function execute() {
-    if (!empty($this->view->result) || $this->getOption('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
+    if ((!$this->getOption('block_hide_empty') && !$this->outputIsEmpty()) || !empty($this->view->style_plugin->definition['even empty'])) {

I'm not sure about this.. Shouldn't it be !hide_empty || !outputIsEmpty? I have to test this manually.

+++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
@@ -93,6 +94,12 @@ public function optionsSummary(&$categories, &$options) {
+      'value' => !$this->getOption('block_hide_empty') ? t('Hide') : t('Show'),

I think that "!" is not needed here, or did I got it wrong again?

+++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
@@ -147,6 +154,15 @@ public function buildOptionsForm(&$form, &$form_state) {
+        $form['block_hide_empty'] = array(
+          '#title' => t('Hide block if no result/empty text'),
+          '#description' => t('Hide the block if there is no result and no empty text and no header/footer which is shown on empty result'),
+          '#default_value' => $this->getOption('block_hide_empty'),
+        );

Missing #type.

--- /dev/null
+++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_empty.yml

This should be ...tests/modules/views_test_config... now.

dizi.joao’s picture

The header and footer "no results" option will only work if you add a no result behavior to the view block. Go to the advanced fieldset and add a no result behavior. Its below "Relationships". You can add a empty "global text area" if you dont want to show anything. Its simple and dont need a patch.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.73 KB
10.44 KB

So by default, show the block even if it's empty, correct?

Yes, we can for sure choose the other default value.

I'm not sure about this.. Shouldn't it be !hide_empty || !outputIsEmpty? I have to test this manually.

Rewrite the bit to make it way way easier to read.

@dizi.joao
The point of the issue is to make it configurable and work as expected.

Here is a version which has the fixes of #57 included.

dawehner’s picture

#64: vdc-1217394-64.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Needs issue summary update, +VDC

The last submitted patch, vdc-1217394-64.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
10.42 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch, vdc-1217394-67.patch, failed testing.

giorgio79’s picture

#63 works like magic. Much appreciated :)

dawehner’s picture

Status: Needs work » Needs review
FileSize
593 bytes
10.3 KB

There we go.

jibran’s picture

Nice it is green. Here is some minor issues.

  1. +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
    @@ -107,6 +107,19 @@ public function preRender(array $results) {
    +   * Is the area empty.
    
    +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
    @@ -2723,6 +2723,31 @@ public function isIdentifierUnique($id, $identifier) {
    +  * Does the view shows anything.
    

    This should be more descriptive imo.

  2. +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
    @@ -2723,6 +2723,31 @@ public function isIdentifierUnique($id, $identifier) {
    +   $area_types = array('empty', 'footer', 'header');
    +   foreach ($area_types as $type) {
    

    We can move this to one foreach and remove $area_types variable.

  3. +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php
    @@ -273,4 +273,47 @@ public function testInvalidDisplayPlugins() {
    +    $view = views_get_view('test_display_empty');
    

    We have a static method for this now Views::getView.

dawehner’s picture

Thank you for the review!!

There we go.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

It is a major bug and now we have a nice test coverage so RTBC for me.

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs issue summary update, -VDC

The last submitted patch, display_empty-1217394-72.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
Issue tags: +Needs issue summary update, +VDC

#72: display_empty-1217394-72.patch queued for re-testing.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC.

damiankloip’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1003 bytes
10.52 KB

Speaking with Tim and catch, we're removing the bitwise logic (to return early if a handler isn't empty) and changing the comment.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This makes it indeed easier to grok.

alexpott’s picture

Title: "Display even if view has no result" not working » Change notice: "Display even if view has no result" not working
Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 8.x-3.x-dev
Component: views.module » Code
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

Committed 2a43a1b and pushed to 8.x. Thanks!

Assigning to Views 8.x for a change notice

MXT’s picture

The original issue was for D7 an other related D7 issues in the queue points here: can this also be back-ported to D7 please?

Thank you very much for considering this

AaronBauman’s picture

Here's a patch for D7 -- it's a one-liner.

The only place I ran into this issue for 7.x was views_handler_area_result.inc
Not sure if I'm missing something else from this thread.

I'm leaving this at 8.x because I don't know whether the change notice has been completed yet.

edit: dunno why the VDC tag was removed when this comment was posted.
i didn't touch the tag field on the comment form, so I'll assume that was supposed to happen for some reason.

Woodyjon’s picture

Version: 8.x-3.x-dev » 7.x-3.7

Patch 81 did not solve the problem for me. v7.x-3.7

dawehner’s picture

@aaronbauman

We want to have the same kind of concept in D7, so you or for example the ctools module can really figure out whether a view is empty or not.

YesCT’s picture

Version: 7.x-3.7 » 8.x-3.x-dev
Category: Bug report » Task
Issue summary: View changes
Status: Needs work » Active

keeping at this on 8.x till the change notice is done. (https://drupal.org/core-gates#documentation has a summary that says move to major task, etc. Disturbingly though, the actual doc about the policy is missing. see #2083415-7: [META] Write up all outstanding change notices before release)

to help with get the change notice done, updating the issue summary would help (contributor task doc on updating issue summary),
and also here are the instructions for drafting a change notice

daveramps’s picture

Issue summary: View changes
daveramps’s picture

Issue summary: View changes
daveramps’s picture

Issue summary: View changes
milos.kroulik’s picture

The patch in #81 doesn't work for me neither (on D7, V 3.7). I'm trying to use it with Dynamic Fields feature of Display Suite.

TechNikh’s picture

Patch in 81 shows the header but the @start token is wrong for me.
"Showing -14 - 0 of 0"

I am using contextual arguments.

schifazl’s picture

I did the same as dizi.joao in #63, works flawlessly

OnkelTem’s picture

As far as I can see the backporting effort was silently abandoned as the patch was not provided for more then year. Or was is so hard/impossible to apply it on D7? Or basically D7 is not a subject of your interest anymore? :) FYI if D8 will be released tomorrow, we'll continue using D7 for year or so.

OnkelTem’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Status: Active » Needs review

Ok, this is D7 backport patch for the #77 issue. The part that I missed is new tests.

OnkelTem’s picture

FileSize
6.44 KB
OnkelTem’s picture

This is follow-up for D7 to get Views Content Panes working with the new stuff: #1245202: Views content pane empty even if "Display even if view has no result" is checked for views header/footer see comment #4

BrightBold’s picture

Status: Needs review » Needs work

The patch in #93 works, but I don't think it's the way we want to solve the problem.

First, it adds a new field in the Advanced > Other section called "Hide block if the view output is empty" rather than honoring that setting in other places. Second, it sets the value of that setting to "Show," by default, which means all the views on your site that you didn't want appearing when empty (which is really a sensible default; otherwise your site is peppered with contentless headers) so you have to go and change it to Hide on all view displays except for the ones you want to show.

sachin.bansal’s picture

I have modified the patch given in #93. Now, all empty block will be hidden by default.

nithinkolekar’s picture

Patch doesn't seems to be working when view(display type: block) is placed inside Quicktab with parameter %2 for term pages. But working fine in view's preview by passing tid manually.
Is this related to quicktab (how it is passing) or related to this patch.

update:
working when tab type is set to block instead of view(select a view,display,argument).
also works when block is placed in theme region using block administration.

eric.chenchao’s picture

Looking at those patches above, it seems those patches are making view / view block show up when ticking "Display even if view has no result". However the title of this node is too vague.

Could anyone provide a more detailed title or better description of the bug please?

osopolar’s picture

What about attachment views, if the view it is attached to is empty? I have a panel pane view display with a glossary attachment and it does not show up in panels. I applied the patch from #96 and #1245202: Views content pane empty even if "Display even if view has no result" is checked for views header/footer.

This may also affect D8 as output_is_empty() only checks the handlers: 'empty', 'footer', 'header'.

milos.kroulik’s picture

Patch in #96 seems to be working fine.

MustangGB’s picture

Status: Needs work » Reviewed & tested by the community

Works like a charm.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 96: views-1217394-93.patch, failed testing.

isimgt’s picture

Patch in #96 seems to be working fine.

Version: 7.x-3.11

greggadsdon’s picture

Updated patch from #93 for latest views 7.x-3.14

osopolar’s picture

Status: Needs work » Needs review

@greggadsdon: Is there a reason for choosing patch #93 and not #96?

MustangGB’s picture

MustangGB’s picture

Status: Needs review » Reviewed & tested by the community

Tentatively marking as RTBC again because the patch is working fine and we're basically just waiting for a committer decision on whether to go with the #93 or #96 approach.

Personally I'd prefer #96.

MustangGB’s picture

Here's a re-roll of #96 then.

DamienMcKenna’s picture

MustangGB’s picture

FileSize
5.8 KB

Manually edited #108 because the header comment indentation for output_is_empty() needed correcting.

DamienMcKenna’s picture

Note: #110 literally only changed indenting of one of the comments, there were no other changes. Leaving this RTBC.

DamienMcKenna’s picture

Having reviewed the patches, #93 (therefore #104) is the way to go because it matches the wording of patch #77.

DamienMcKenna’s picture

Still needs a change notice because of the subtle change.

DamienMcKenna’s picture

Taking this off the plan for the next release, will consider it later.

MustangGB’s picture

FileSize
5.84 KB

Re-rolled #110.

tobiasb’s picture

Status: Reviewed & tested by the community » Needs work

Patch do not apply anymore.

chuck_theobald’s picture

This is still a problem with version 7.x-3.20.

randell’s picture

Still an issue in Drupal 8.

AaronBauman’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 9.x-dev
Component: Code » views.module
AaronBauman’s picture

Version: 9.x-dev » 8.7.x-dev
MustangGB’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.7.x-dev » 7.x-3.x-dev
Component: views.module » Code

D8 has already had it's commit, if a follow-up is needed probably best to create a new issue.

skylord’s picture

Status: Needs work » Needs review
FileSize
5.16 KB

Reroll for 3.20 attached - works OK for me.

Chris Matthews’s picture

@skylord, what patch/comment # did you use for the rerolled patch in #122?

skylord’s picture

Sorry not to mention it. It was #115.

Chris Matthews’s picture

No problem, based on the reading of this issue thread:

The patch in #122 is a reroll of the patch #115

The patch in #115 was a reroll of the patch in #110.

The patch in #110 was a manual edit to the patch in #108.

The patch in #108 was a reroll of the patch in #96.

The patch in #96 was a manual edit to the patch in #93

However, @DamienMcKenna mentioned in #122:

Having reviewed the patches, #93 (therefore #104) is the way to go because it matches the wording of patch #77.

Please correct me if I'm wrong, but I think we've gotten off track on the most relevant patch to be working from.

skylord’s picture

You are right. There are two branches of patches: #93 - #104 and #96 - #108 - #110 - #115 - #122. The only difference is that second one considers block hiding as default behaviour and has reverse logic to #93: empty blocks are hidden and you have to manually set checkbox "Show block if no result/empty text" to show'em.

MustangGB’s picture

As aforely mentioned I think they empty ones should be hidden by default, à la #122.

But if we could just have a decision and get a commit that'd be ideal as this is still a blocker for #1245202: Views content pane empty even if "Display even if view has no result" is checked for views header/footer.

DamienMcKenna’s picture

Might anyone have time to try writing some test coverage for this?