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.
I know there is already a discussion to integrate workbench_moderation with node_revision_delete but it looks a really complex integration with some dashboards, etc. Please find a patch with a simple integration with the hook_workbench_moderation_transition. Each time a new revision is created, it will check all requirements (number of revision to keep) and delete revisions which must be deleted.
Comment | File | Size | Author |
---|---|---|---|
#11 | node_revision_delete-integrate-with-workbench-moderation-2248657-11.patch | 944 bytes | vbouchet |
#1 | 2248657-1-hook-workbench-moderation-transition.patch | 3.38 KB | vbouchet |
Comments
Comment #1
vbouchetComment #2
vbouchetComment #3
vbouchetComment #4
vbouchetComment #6
vbouchetI need to rework it as it was initialy designed for the 7.x-1 version.
Comment #7
vbouchetComment #8
juampynr CreditAttribution: juampynr commented@vbouchet, are you still working on this?
Comment #9
vbouchetHi Juampy,
No sorry I'm not working on it. Feel free to go ahead with it or tell me you want it for your release, I will try to find some time to adapt the patch to the new version.
Thanks,
Comment #10
DamienMcKennaThe correct status is "needs work" rather than active.
Comment #11
vbouchetHi Juampy,
6 months later, I finally found some time to work on it.
Please find a patch to integrate with workbench_moderation. There is currently no specific option, that means each time a transition occurs on workbench moderation, the system is triggered and will remove oldest revisions (if exceeding the maximum number of revision).
Let me know if you want me to add an option somewhere to have it configurable.
I think we should move admin interface into a specific node_revision_delete.admin.inc file. Let me know if you are interested and I can provide a patch.
Comment #13
juampynr CreditAttribution: juampynr at Lullabot commentedCommitted. Thanks!
Comment #15
hanoii3 years later I happen to need this configurable, I wondered why my revisions were being deleted :scream: :). I wonder if at least it should avoid if the cron setting is set to never. Anyway, just noting it and adding myself here. Might come back to it but for now I can make do by disabling this module.
Comment #16
hanoiiHmm, further looking into this I wonder why it was included at all. If cron was still going to take care of removing the revisions.
Comment #17
nelsongrin CreditAttribution: nelsongrin at European Commission and European Union Institutions, Agencies and Bodies for European Commission and European Union Institutions, Agencies and Bodies commented@hanoii I agree with you, this should never have been included.
Please have a look to this issue where expose several problems Updating nodes deletes revisions and using a wrong hook.