Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module is one of the most useful administrative tools available for Drupal 6. It would be great if it had operations available for taxonomy terms also. The ones I'm thinking of right now are:
* Delete term
* Switch vocabulary
* Set as a synonym
Comments
Comment #1
infojunkieThanks for your suggestions. I'm not sure when I'll have time to work on these, because I usually focus on the core VBO functionality and only add new actions when I need them myself. In the mean time, you're welcome to contribute code, and I'd be happy to assist you.
Comment #2
EvanDonovan CreditAttribution: EvanDonovan commentedSounds reasonable. I can use the Actions API to add new bulk operations, correct?
Comment #3
infojunkieCorrect. Take a look at http://drupal.org/node/459070 for an (incomplete) intro on writing actions for VBO.
Another thing, not yet mentioned in that guide, is that VBO has a general mechanism to support classes that Views 2 supports (Nodes, Users, Comments, Terms, etc). VBO achieves this generality by relying on
hook_views_bulk_operations_object_info()
to supply it with relevant info about those classes. However, VBO itself only implements this hook for classes Nodes, Users and Comments. You will have to implement this hook for Terms, like so:Then, your actions should be declared with attribute
type = 'term'
because that's how you declared the type in the hook.Hope that's not too confusing :-)
Comment #4
giorgio79 CreditAttribution: giorgio79 commentedEvan have you made any progress on this?
I just wanted to create a term based view with Bulk Operations, because with the term node count
http://drupal.org/project/term_node_count module
it would be one of the best ways to manage a taxonomy. Maybe even better than taxonomy manager. It would be easy to find orphaned terms etc etc. by sorting on the term node count :)
I notice there is already a taxonomy.action.inc but that is for nodes, so adding, deleting etc terms related to nodes.
Should I be expanding that file if I try to do some coding?
Comment #5
infojunkie@giorgio79: you can expand on taxonomy.action.inc if you wish. In any case you should attach your file here, to let me review it before committing it. If you start working on this, please set this issue to active and assigned to you. Thanks!
Comment #6
giorgio79 CreditAttribution: giorgio79 commentedThanks Karim.
I was looking at taxonomy.action.inc, which already has a
views_bulk_operations_taxonomy_action_info
but for operations on terms related to a node.
Do you have a preference for naming the term view related term operations sg like
views_bulk_operations_tern_action_info ?
Also, I noticed you have a delete.action.inc and a taxonomy.action.inc. Which one should contain the delete term action?
Could I get away with a delete term action in a term view just like this? (although I suspect this would not work because of the 'behavior' => array('deletes_node_property'), )
Add to delete_action.inc
Comment #7
EvanDonovan CreditAttribution: EvanDonovan commentedgiorgio79:
I haven't worked on this at all since my original post. Other priorities have come up at work. If I get around to it at all, it won't be for probably a month at least. But I'd love to review anything you come up with :)
Comment #8
GreyHawk CreditAttribution: GreyHawk commentedI'd find this useful too -- I have a bunch of taxonomy terms and vocabularies that got loaded with incorrect node import and file settings, and need to eliminate a lot of them.
Can't seem to do it with Taxonomy Manager, and can't seem to do it with VBO (yet) -- in VBO, the lack of operations for taxonomy terms (and the complete lack of an "Operations" tab) are slowing me down.
:/
Comment #9
infojunkie@GreyHawk: are you talking about Drupal 5? The "Operations" tab was renamed to "Settings" in D5, and it has been replaced by the "Bulk Operations" settings in D6.
I added support for terms, including an action to delete terms, in the latest dev.
Comment #10
EvanDonovan CreditAttribution: EvanDonovan commentedExcellent, thanks kratib!
Comment #11
GreyHawk CreditAttribution: GreyHawk commentedAh -- Drupal 6, not 5 -- thanks for the correction, kratib.
I need to download the latest Dev version to test then; I'm using the non-dev version.
Comment #12
giorgio79 CreditAttribution: giorgio79 commentedWow Karim, that is massive :)
With a term VBO this module could easily beat taxonomy manager.
A few default views for terms, nodes and users would make it even easier for users to get started.
What do you think? Perhaps I could post here mine for inclusion?
I built a
manage-node
manage-term
manage-user
VBO pages for administrative tasks :)
Comment #13
giorgio79 CreditAttribution: giorgio79 commentedJust a tip, for your VBO term view.
If you install http://drupal.org/project/term_node_count you can see how many nodes belong to a term in your view.
Comment #14
infojunkie@giorgio, there's currently only one taxonomy action that I know of, namely the one to delete terms. As you said in your original report here, we need other actions such as move terms across taxonomies, make synonym, etc. Once we have those actions, we can create a HOWTO on the VBO guide to create a term administration interface.
Comment #15
GreyHawk CreditAttribution: GreyHawk commented@kratib -- still not able to see or load operations for terms/vocabularies, but can see other operations. I probably need to spend more time with it.;
Re: your later note re: actions for taxonomies, I'd find it useful to delete vocabularies... (not sure about anyone else)
Comment #16
giorgio79 CreditAttribution: giorgio79 commentedHey Karim,
It seems term delete vbo gone missing in the latest dev release :)
It was working fine with the previous one.
Comment #17
infojunkie@giorgio79: how is the "Delete term" action missing:
* Can you find it when you run an existing Term view?
* Can you find it when you edit an existing Term view?
* In delete.action.inc, are there a couple of places where you find
views_bulk_operations_delete_term_action
mentioned?* In views_bulk_operations.module, function
views_bulk_operations_views_bulk_operations_object_info()
, can you find an entry for'term'
?Also, please make sure you're not inadvertently using 2 copies of VBO in the same installation.
Comment #18
giorgio79 CreditAttribution: giorgio79 commentedMy apologies Karim, I was playing around with the Plugin Manager, and it overwritten my dev version with the previous stable one.
Comment #21
benone CreditAttribution: benone commentedIs this feature for term already working in VBO ?
Which version should I download ?