Closed (fixed)
Project:
Bean Tax
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2012 at 19:57 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent
This module all seems to working fine except for the scenario when there are no possible results i.e. ZERO matching taxonomy terms.
In this situation I think the empty block itself should not show at all.
Comments
Comment #1
saltednutThis is not a bug as we've intended to build this way.
I understand this is the behavior one would see from a Views block, so I'm changing it to a 'Feature Request'.
I've talked with indytechcook about this issue with Beans (in general) and his feedback was this should be handled through theme templates.
-- See: http://drupal.org/node/1380640
I think we could handle this in the class as well but I haven't dived into the issue.
The best course of action might be to include a checkbox on the form that says 'do not display block if no results' or something along those lines.
There are cases where people want to see the block even without any results.
Comment #2
valderama commentedI have solved this like this for a custom bean type. Happy on any suggestions and of course if we could add "standard" way for all beans.
Comment #3
saltednutThat is a nice workaround for the bean_ui class (custom beans) since we aren't able to actually edit the class itself.
Using similar login
return;(returning nothing), we've modified both bean_tax classes accordingly in 7.x-2.x - 18e6d9f (see dsdeiz commits from Nov 21 as well: http://drupal.org/node/1376658/commits)Will work on backporting this to 7.x-1.x next.
Comment #4
saltednutHere is the 1.x commit: 68da539 - changes are in dev.
I'm not tagging a release yet as this creates a new bug that we'll need to chase. (see below)
The issue with an empty return statement is that the actual page render of a bean is also cancelled.
Using a hide_empty variable set to TRUE, you'll se a WSOD at http://yoursite.com/block/[block-machine-name]
Probably not a showstopper as long as you aren't planning on using the actual page callbacks.
Still, it warrants an issue of its own #1851050: return_empty variable also cancels bean view pages when set to TRUE
Comment #5
saltednut