- 🇳🇱Netherlands seanB Netherlands
Just pushed the module rewrite to a new 2.0.x branch. https://git.drupalcode.org/project/node_revision_delete/-/tree/2.0.x
Since it was basically a complete rewrite, I'm not sure if it makes sense to do this using small patches. For now, we squashed all our work into a single commit: https://git.drupalcode.org/project/node_revision_delete/-/commit/8c528e1...
- The settings form has been changed to allow generic defaults for the plugin settings, with the option to override the defaults per node type.
- An update hook has been created to migrate any existing settings to the new plugin settings.
- We created 3 plugins to basically support the same functionality as the module already did:
- Keep a minimum amount of revisions
- Keep revisions for a minimum amount of time
- Keep drafts for a minimum amount of time
- We use a queue worker to call all plugins for a node and determine which revisions can be deleted. The revisions are split per language.
- A drush command has been added to add all existing content to the queue and let the queue figure out which revisions can be deleted.
- Content is also added to the queue when a new revision is added.
- Tests are added for the plugins the module ships with.
Attached is a complete diff as well. We removed a lot of code that no longer seemed to be necessary. If you see anything that you think needs to be added back, or seems to be missing, it might make sense to convert this issue to a new meta and create smaller issues from here.
- 🇨🇦Canada adriancid Montreal, Canada
Hi @seanB, thanks for this, I just created the dev branch and the alpha release for the branch to allow users to test this new version, I will try to test and review too. I think we can close this issue and start creating new issues if we discover new things.
Thanks for this,
Adrian - 🇨🇦Canada adriancid Montreal, Canada
@seanB I think is a good idea if you can update the project page with the information about the new version, if you want you can create a new issue for this.
- 🇳🇱Netherlands seanB Netherlands
Just updated the project page. Please feel free to make any changes you like.
- Status changed to Fixed
almost 2 years ago 8:02pm 25 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.