Closed (fixed)
Project:
Node Revision Delete
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Reporter:
Created:
26 Sep 2017 at 15:31 UTC
Updated:
5 Sep 2019 at 19:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
adriancidComment #3
ec0g commentedHi @adriancid,
I have some code that should resolve this issue. We have a need to use this functionality so I figured we can contribute some code back to help with the effort.
I have a branch ready with the code to push to the repo (just need access). I added a patch file here so you can take a look at the code.
Comment #4
adriancidThanks @ec0g for the patch.
I'm returning from holidays, there is something that I see very quick, you use:
' months ago'But the time can be weeks and days too, you need to check the configuration for this.
Read more at: https://www.drupal.org/project/node_revision_delete/issues/2892807#comme...
Comment #5
ec0g commentedThanks for the feedback @adriancid. Hope your holidays were great.
I will check the configuration and update the code. I should have an updated patch in the next few days.
Comment #6
ec0g commentedTranslate the time interval selected by the user into a \DateTime object.
Comment #7
adriancidHi @ec0g, thanks again for the patch, I don't have time yet to check if the nodes candidates are correctly identified (one reason is that I don't have a database with revisions, so if you can provide me one this will help me) but I have some remarks (I fixed some of them) that should be fixed in the code concerning the coding standards.
Comment #8
kamkejj commentedHere's a re-work of patch 7 with the formatting fixed. Not all comments are necessarily meaningful.
Comment #9
adriancidHi @kamkejj thanks for the patch, I don't have time to test this in the next days, do you test it and it really has shown the candidates nodes?
Comment #10
kamkejj commentedDidn't get a chance to test today, but will tomorrow.
Comment #11
adriancidI tried to apply your patch but it doesn't work, should I need to apply the patch in #7 or in #6 before?
Comment #12
nplowman commentedI went back through the previous patches and tried to piece things together so the patch would apply cleanly.
I don't have the full context to know how to test it right now, but I'm interested in helping get this D8 port complete, so I'll likely continue to investigate and contribute more in the following weeks.
Comment #13
adriancid@nplowman thanks, will be great if you can help with this. We need to identify the candidate nodes with revisions to delete, one problem that I have is that I need a database with revisions or a drush command or something to create many revisions to test this functionality.
I'm creating now some tests for the module because I'm don't have enough time to develop this functionality and the other that will delete the revisions.
Comment #14
larowlanre-roll
Comment #15
adriancidComment #16
volkswagenchickTagging for DrupalNorth 2019
Comment #17
adriancidComment #18
adriancidComment #19
adriancidComment #20
adriancidComment #21
adriancidComment #22
adriancid