Node Revision Delete

Component ID

1779880

Component name

Node Revision Delete

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

33835

Component created

Component changed

Component body

The Node Revision Delete module lets you to track and prune old revisions of content types.

Features:

  • Define the max amount of revisions to keep per content type.
  • Run on Drush, cron run or on a different period (daily, weekly, etc).

Drush commands

drush node-revision-delete
Deletes old node revisions for a given content type.
drush nrd-delete-cron-run
Configures how many revisions delete per cron run.
drush nrd-last-execute
Get the last time that the node revision delete was made.
drush nrd-set-time
Configures the frequency with which to delete revisions while cron is running.
drush nrd-get-time
Shows the frequency with which to delete revisions while cron is running.
drush nrd-when-to-delete-time
Configures the time options for the inactivity time that the revision must have to be deleted.
drush nrd-minimum-age-to-delete-time
Configures time options to know the minimum age that the revision must have to be deleted.

Resources

Support

If you need paid support beyond the issue queue, or you need custom functionalities, you can drop a message to the main developer.

About 8.x version

Help us to migrate the module. Follow the #2808383: Node Revision Delete Drupal 8 port

Recommended modules

Drush Help
Improves the module help page showing information about the module drush commands.

About 7.x-3.x version

We are porting the new Drupal 8 functionalities to this branch. Thanks to #2892807: Use the minimum_age_to_delete and when_to_delete variables to delete revisions beta1 arrive, but we need test it before the final release. Help us!

Recommended modules

Chaos tool suite (ctools)
When enabled the links displayed in the operations column in the module
configuration page will be displayed as a dropbutton.
Views UI
When enabled the dropbutton displayed in the operations column in the
module configuration page will improve his style.
Drush Help
Improves the module help page showing information about the module drush commands.

Known problems

#2817669: No awareness of translations (incompatible with entity_translation)
#2800609: Not deleting revision for field collection
#2915230: Use the minimum_age_to_delete variable in the node revision deletion

Similar Projects

Node Revision Cleanup
The concept behind this module is to be able to run multiple invocations at the same time, via Drush to maximize the number of node revision deletions per second.
Differences:
  • Don’t have user interfaces, is a collection of drush commands to configure and clean revisions
  • Uses one variable for each content type when the best option is use only one variable with the info of all content types
Revisionator
Allows you to delete the revisions for all the content types, you can’t restrict revisions for each content type. Possible settings include the revision age before being deleted and the minimum revisions to keep per node.
Differences:
  • The cleanup is made in the hook_cron() hook, but if you have many revision to clean the cron execution will take a long time that is not handled with a queue and can give you a time limit error
  • You can’t restrict revisions for each content type
  • There is not drush commands to configure or run node revisions cleanup
Node Revision Restrict
Restrict revisions of node for each content type. This module has an admin interface to specify node revision threshold for each content type available. The possible setting include node type with corresponding revision limit, provided on the Node Revision Restrict configuration form.
Differences:
  • Is very basic, the revision deletion is done in the hook_node_presave() hook, so for this you need to save the node. If you need to clean all the database this is not the best option
  • Will only works fine for new projects that start creating content once the module is installed
  • The module use one variable for each content type when the best option is use only one variable with the info of all content types
  • You can’t delete the revisions based in the revision age (time)
  • There is not drush commands to configure or run node revisions cleanup
Revision Deletion
Enables the ability to mass delete aging node revisions. Possible settings include node type, the age of node revision before being deleted, along with a Cron frequency setting.
Differences:
  • The cleanup is made in the hook_cron() hook, but if you have many revision to clean the cron execution will take a long time that is not handled with a queue and can give you a time limit error
  • You can’t set how many revision should be keeped in each node
  • You can’t restrict revisions for each content type
  • There is not drush commands to configure or run node revisions cleanup

Issues

As with all contributed modules, when considering submitting an issue:

  1. Read the documentation (two or three times is better). Don't forget the home page.
  2. Review the existing issues list. (Don't forget to select "<- Any ->" for the "Status" field.)
  3. Gather all the appropriate information. This may include (but is not limited to):
    • Drupal version.
    • Browser type and version.
    • Database type and version.
    • Error messages, if any.
    • Module settings.
  4. Submit the issue. If other modules are involved, you may need to submit the issue to those modules as well.
  5. If you go to provide a patch use the following naming convention:
    [project_name]-[short-description]-[issue-number]-[comment-number]-[drupal-version].patch

And please don't forget to use the Issue Summary Template to report an issue, if you need help to understand how the issue queue works, see the Getting Started in the Issue Queue video.

Development version status

The development versions (-dev) are where the newest stuff is, including any bug fixes and new features. We try to make sure it is tested before we commit anything, but occasionally a bug will get by us. Your help on testing this code is greatly appreciated. The translation templates may not always be up-to-date in the dev releases.

Ville de Montréal