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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derhasi’s picture

Issue tags: +d7uxsprint

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.

derhasi’s picture

Extending hook_node_operations with some "additional form" could deal with that issue, by adding a new update option Add term to node.

derhasi’s picture

Status: Active » Needs review

In a first step I created a trigger action Add a taxonomy term to a node..

Next step would be to extend node operations.

derhasi’s picture

derhasi’s picture

Title: Add ability to bulk update terms » Add ability to bulk update nodes with adding terms
derhasi’s picture

Could provide this functionality without adding actions. Therefore I used hook_node_operations and some form alter via taxonomy_form_node_admin_content_alter to add an additional information box to the admin/content/content, after selecting "Add a term to nodes".

Patch attached.

derhasi’s picture

FileSize
68.91 KB

Screenshot attached.

derhasi’s picture

Assigned: Unassigned » derhasi
FileSize
4.33 KB

* Code style issues removed
* added some more check to avoid "no-change-savess"
* added drupal_set_message

derhasi’s picture

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

Dries’s picture

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.

derhasi’s picture

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 a callback 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?

derhasi’s picture

Opened an issue for extending hook_node_operations() that could ease this issue as described above:

#505466: Extending hook_node_operations for supporting forms.

moshe weitzman’s picture

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

Bojhan’s picture

@moshe But the answer to fixing this issue, shouldn't be download Views Bulk Operations?

moshe weitzman’s picture

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.

catch’s picture

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.

Status: Needs review » Needs work

The last submitted patch failed testing.

wwwoliondorcom’s picture

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.

catch’s picture

Version: 7.x-dev » 8.x-dev

Moving to Drupal 8.

derhasi’s picture

Assigned: derhasi » Unassigned
derhasi’s picture

Status: Needs work » Postponed

Hm, I guess this issue isn't feasible directly anymore, as we deal with fields in core. That issue was started when that was not the case.
However this could be tackled by VBO Actions in core.

The whole admin views in core seems/seemed to take place here: #1823608: Admin views in core

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.