Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
13 May 2008 at 07:03 UTC
Updated:
12 Aug 2009 at 20:00 UTC
Counting only published nodes would be a very handy feature.
E.g. A view has 18 nodes visible (published status = true is a non hidden filter), yet shows 23 nodes under in hs selector.
A bit misleading for just about every case I can think of. Generally published is used to hide content from users... so they shouldn't know it's there at all if they don't have access.
One day :)
Comments
Comment #1
wim leersI agree. Views' interpretation of **ALL** really is: "ignore this filter", not: "get nodes that match any of the available terms". So I will override the node count stuff for the Views Taxonomy implementation.
Comment #2
wim leersHm, this is as reliable as it can get: if you add more filters – exposed or not – the numbers will start to deviate even more. To be accurate, I'd have to build the view in my counting code and then extract the number of nodes from that (i.e. only look at the nodes that are being displayed in the view). But you could argue that doesn't make sense either. What do you think?
One more remark: I'm currently counting the number of nodes for each term, regardless of that node is published or not. I'm going to add a check for that.
Comment #3
pingers commentedIt's a tough one.
I think you can only restrict the count to that particular vocabulary (thinking multiple hs vocabs per node).
Building the view does sound expensive...
I'm really happy where it's at now.
Future issue may be to make an option to build the view to create the counts.
Adding a published check is probably a nice compromise, without too great a performance hit.
Comment #4
wim leersBuilding the view is not expensive. It's cached. And it'll be the exact same view that Views generates, so it's actually incredibly cheap.
The count is already limited to that particular vocabulary. Because that's easier :P
As you are suggesting, I'm postponing this.
Comment #5
wim leersComment #6
wim leersThis has been implemented as part of #342991: Port HS support for Taxonomy Views to Drupal 6!