Posted by beeradb on March 7, 2009 at 7:54pm
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | taxonomy.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | derhasi |
| Status: | needs work |
| Issue tags: | d7uxsprint, UBUserTesting2009, Usability |
Issue Summary
Consider adding a bulk update of terms from the admin/content/node page. A user who created his nodes before his vocabularies at UB User Testing 2009 went to the admin/content/node page to try and bulk update his nodes to add the terms he wanted. This seems like a nice feature.
Comments
#1
I currently think about an approaches.
* The first step may be to add an action for adding a new term to a node.
Form:
* Adding a new fieldset to admin/content/content where you can select the vocabulary and term to add
* validation has to check, whether the content type is assigned to the vocabulary selected
Additional opportunities where to bulk remove tags from nodes and maybe bulk switch terms from one to another.
#2
Extending
hook_node_operationswith some "additional form" could deal with that issue, by adding a new update option Add term to node.#3
In a first step I created a trigger action Add a taxonomy term to a node..
Next step would be to extend node operations.
#4
#5
#6
Could provide this functionality without adding actions. Therefore I used
hook_node_operationsand some form alter viataxonomy_form_node_admin_content_alterto add an additional information box to the admin/content/content, after selecting "Add a term to nodes".Patch attached.
#7
Screenshot attached.
#8
* Code style issues removed
* added some more check to avoid "no-change-savess"
* added drupal_set_message
#9
Another improvement with more status messages. Guess the last one for today for me.
If this patch will be reviewed successfully, we could think about "removing terms".
#10
I applied the patch but did not understand how it worked. The help text, and the checkbox, confused me. I think we need to work on the labels and help text.
I have not reviewed the code yet.
What I need more than this, is an interface to mass administer node terms. That includes seeing what nodes have which terms, and having the ability to delete and add terms quickly. While this patch is helpful, it doesn't help me with the overview or deletion of terms. There might be other ways to go about this. I think the way Google Mail does filter creation might be a good example. First, you search or filter what nodes you want to tag, you get a preview of the selected nodes, and then you add a term to them. You can sort of do that today, but it is not as clear. I think we're close though.
#11
Technically the patch works like the delete node operation does. When the add term operation is selected, the form gets altered on refresh to wait for additional entry (selecting the term to add to the node). For some reason I did not get to override the form completely via form alter.
For having better control on the node operations, maybe it would be a better approach to extend the
hook_node_operations()with acallback form, that can alter or provide additional callback arguments for the callback function. That would need API addition in node module.Depending on the taxonomy problem, then we could provide a more user friendly form, with maybe node preview, or at least a column with existing node terms.
What do you think about that approach?
#12
Opened an issue for extending
hook_node_operations()that could ease this issue as described above:#505466: Extending hook_node_operations for supporting forms.
#13
@Dries - you should really check out Views Bulk Operations if you have not already. That completely solves this need, and about 1000 other ones that admins often have. Bulk updating from anything to anything is completely solved. And not just for nodes either. Users, comments, feed items, etc. Folks are welcome to work hard on one or two use cases like this issue for core. But I see no utility in that.
#14
@moshe But the answer to fixing this issue, shouldn't be download Views Bulk Operations?
#15
This is a feature request for a feature which IMO belongs in contrib. At least core cannot do it nearly as well as contrib until we have all of views in core which is currently estimated for drupal 18.
#16
This really looks like 'views bulk operations in core' to me as well. I think we need a package with views, views bulk operations and default views set up and enabled which override the core interfaces to add features like this, until Views is in core.
#17
The last submitted patch failed testing.
#18
Hello,
Do you know what could be a SQL query or any other way to add a chosen term to all the nodes without a term ?
Thanks a lot.
#19
Moving to Drupal 8.