Closed (fixed)
Project:
Node Revision Delete
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Dec 2019 at 19:57 UTC
Updated:
26 Dec 2019 at 22:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
solideogloria commentedChanging to Critical because of the potential for data loss
Comment #3
solideogloria commentedA potential workaround is to set the "How often should revision be deleted while cron runs?" setting to "Never" before upgrading, upgrade, set the configuration you want, then set the setting back to what you want it.
Comment #4
adriancidHave you run the update?
Comment #5
solideogloria commentedYes. If you don't, the configuration page does not even load.
I had a single content type set to 50 max revisions, with Cron set to run monthly. The other content types were set to Untracked.
After the upgrade on a test environment, ALL of my content types were set to keep only 50, with no minimum age, and to always delete. Cron was still set to run monthly.
Because of my configuration and data, it would not have been a big deal for me even if it had run. But I could see it being an issue for other users and configurations.
Comment #6
adriancidCan you provide a patch for this?
Comment #7
solideogloria commentedI can look at it tomorrow. I don't think it will take too long, since I know it is in
node_revision_delete_update_7300()Comment #8
adriancidI remember I create a hook_update for the config but the last time I used the 7.x-2.x version was 2 years ago, just check the hook_update to see if something is missing.
Comment #9
solideogloria commentedIt wasn't checking the variables for whether the type is tracked. I compared the variables from 2.7 and 3.x. The only thing that needs to be changed is adding an "if" statement, because 3.x omits the types from the
node_revision_delete_trackvariable if untracked.I tested the new code on the site I saw the issue. I no longer see the issue, and all the types that are untracked stay untracked after the upgrade.
Comment #10
solideogloria commentedComment #11
solideogloria commentedNote that this could still be improved, because the variables are already loaded above to get the content type names. So maybe the variable values could be loaded at the same time?
Either way, I can't imagine there would be a large enough number of content types for this to make a difference, and the currently solution works and only has to run once.
Comment #13
adriancidthanks
Comment #14
adriancidhttps://www.drupal.org/project/node_revision_delete/releases/7.x-3.0-rc2