Hi everyone.

I built a site for a real estate company. A Taxonomy category is used for the city/town where the property is located. The field accepts free tagging.

When a property is deleted, and it was the only property in its town, it's fair to think that this vocabulary term should dissapear.

But, of course, it doesn't.

We discovered that when a property is deleted, and the "city / town" term is no longer used by any node, it stays in the database anyway. I understand this is a logical behavior, but I need to change that.

HOw could I do it?

Thank you.

Comments

nachenko’s picture

I found it.

Thanks people on Drupal IRC. Not only I fixed it, but I've written my first (dirty but functional) module for Drupal.

I'm not publishing the solution here because the code is crap, but if anyone is interested, just contact me.

wwwoliondorcom’s picture

hi,

I was looking for the same thing, do you know how to automatically delete terms without a node ?

Is there a new module to do that now ?

Thanks a lot.