So I'm working on this project, and it's been going pretty great thus far. I'm incredibly close to being done and really kicking ass at getting the site perfect. Then I stumble accross this big pitfall with vocabulary index: I don't want to display terms with no nodes assosciated with them.

Explenation of where the problem occurs:

Say I create a content type of "food", which has a vocabulary "toppings" setup for free tagging. Let's say we create a node for this content type of "food" called "Hamburger burger". For the toppings vocab, I input... cheese, ketchup, Peanut butter and Mustard as the terms. I then later discover peanut butter is miserable on cheeseburgers, and I delete it from the node. The term is still saved, and when I view a vocab index for for "Toppings" Peanut butter is still displayed, even if no other nodes reference it.

What is the point of displaying empty taxonomy terms?

Okay, there may be some use somewhere, but overall it seems like a great way to lead users to a dead end. In the end I guess this is more of a revision request, but I couldn't find where those go. Please move this there if you want. Also, could some one could explain to me what line in the code is where the topics are displayed, along with the node count? If they're all in the same spot (as I imagine) I could simply make rendering the term at all dependant upon the node count being greater than zero.

Comments

xano’s picture

Component: User interface » Code
Status: Active » Closed (duplicate)

Duplicate of #343422: Hide entities that have no children.

Look in the code for taxonomy_term_count_nodes(). That is where all node counts are being fetched.

jnicola’s picture

Alright I tested that per the handbook link in the other thread, and nothing was rendered at all, simply nbsp's. Given that what I'm working on will shortly be viewed by the person I am working on the development for, I can't show you the rendering where the issue occurs currently.

Anyways, absolutely nothing is being rendered at all where the terms should be listed. I did everything per the code in the handbook you wrote, and dropped the file into my current theme. Also, what if there are no terms under "A" that should be visible. Will "A" Still be rendered as an alphabetical option?

(Also, should I move this discussion to the other thread?)

By the way, your help is extremely appreciated. You are awesome for contributing to this module!

xano’s picture

The handbook entry isn't entirely correct, ad described in the other issue. Also, this is a feature request and as such it will not be added until a new version.

jnicola’s picture

I haven't checked the module for a while as the project I needed it for was paused for college finals. We will start it up again soon so I am curious if any progress has been made.

xano’s picture

Nope, not yet. If you got any PHP knowledge it's easy to do it yourself. I still have to decide if I put this in one last version of Vocabulary Index or that I'll spend my time on Index.

Oh, and please continue in the other issue :)

BayouBill’s picture

Bump. Sorry that I'm not complying with the request in #5 to "continue in the other issue", but...

With reference to #1, how can this be a duplicate of #343422: Hide unused terms, if #343422 is an issue for the Index project, and this thread is an issue for Vocabindex?

I would like to see this as a configuration option in Vocabindex. It would make the UI much more understandable, intuitive, and useful to a typical non-technical user in most scenarios, and it would significantly reduce the page real estate now taken up by unused terms in a large vocabulary.

As jnicola says, "What is the point of displaying empty taxonomy terms?"

xano’s picture

As you can see in #343422: Hide entities that have no children that issue once was in the Vocabulary Index issue queue.

BayouBill’s picture

"that issue once was in the Vocabulary Index issue queue"

But it no longer is, so there is no duplicate of this issue in the current Vocabulary Index queue, right?

It's very confusing to have an issue that is posted to one module moved to an entirely different module's queue, even if the module to which it is moved is being developed as the successor of the original module. If what you are trying to say in doing this is "I won't fix this for this module, but I may fix it for this module's successor", then why not just close the original thread out as "won't fix", and open a new thread on the successor module's queue?

xano’s picture

Title: Vocab Index -- Can the module NOT render empty terms » Do not render empty terms
Status: Closed (duplicate) » Closed (won't fix)

You're right, so here it is.