You say it is not working. Can you elaborate? Do you experience a bug or are you still seeing old versions in the database?
The easiest way to verify how many versions you have left, is go to the Info tab, select Actions > Rollback and count the items in the dropdown.
(see also my earlier post)
We have this set up on an Umbraco version 7.8.1 site, and what I noticed was this...
If my config includes:
<add docTypeAlias="PressRelease" maxCount="5" />
then I Publish a PressRelease content node which has more than 5 versions (according to the Rollback list), now there are zero versions (according to the Rollback list)...
This is using UnVersion 2.1, which I assumed was using the MaxInt value for the maxDays param, so wouldn't that mean that irrespective of the age of the versions, 5 should be saved?
Not working on 7.5.2
Hi, I try to delete old versions for only one node type, but not working. In the unversion.config file I have this:
I tried change this configuration by this line:
but still not working at all. I understand, with this configuration I have 2 days past versions and only one version per day, correct?
Another question, when the plugin code executes? I think executes when I publish a version but I am not sure.
Can you help me please?
Regards!
I've been playing with this today.
The code executes when you publish an item (not just save).
will retain no more than 5 versions, IF they are no more than 10 days old. MaxCount does not mean 5 version per day, but total.
e.g. if you have 5 versions of this file, but only 2 are less than 10 days old, only those 2 will be retained.
Your sample will only retain 1 version. If that is your desire, you can omit the maxDays property.
The code that determines of a version is to be retained :
You say it is not working. Can you elaborate? Do you experience a bug or are you still seeing old versions in the database?
The easiest way to verify how many versions you have left, is go to the Info tab, select Actions > Rollback and count the items in the dropdown. (see also my earlier post)
We have this set up on an Umbraco version 7.8.1 site, and what I noticed was this...
If my config includes:
then I Publish a PressRelease content node which has more than 5 versions (according to the Rollback list), now there are zero versions (according to the Rollback list)...
This is using UnVersion 2.1, which I assumed was using the MaxInt value for the maxDays param, so wouldn't that mean that irrespective of the age of the versions, 5 should be saved?
So, I changed the config to:
and I downloaded/recompiled the sourcecode (so I could step-through-debug it), and my issue is now gone.
I'm not sure if the config change fixed it, or if the sourcecode had some improvement since the 2.1 package...
FYI for troubleshooting, you can add this to the bottom of your log4net.config file:
And you will see the actual SQL statements in your Umbraco log file.
is working on a reply...