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

wim leers’s picture

Assigned: Unassigned » wim leers
Category: feature » task

I 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.

wim leers’s picture

Hm, 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.

pingers’s picture

It'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.

wim leers’s picture

Title: Node count for taxonomy » Accurate node counts in Taxonomy exposed filters
Status: Active » Postponed

Building 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.

wim leers’s picture

Version: 5.x-3.x-dev » 6.x-3.x-dev
wim leers’s picture

Status: Postponed » Fixed

This has been implemented as part of #342991: Port HS support for Taxonomy Views to Drupal 6!

Status: Fixed » Closed (fixed)

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