depend on umbraco version, umbraco has history cleanup process, you can define it more frequent for specific document type
Document Type->Permission->History cleanup
raiseEvents aslo avaliable - not sure that it will do that you need
using (var scope = StateService.ScopeProvider.CreateScope(autoComplete: true))
{
using (_ = scope.Notifications.Suppress())
{
ContentService.SaveAndPublish(item);
}
}
But the naming is so confusing trying to figure out what each one does
Like the
KeepLatestVersionPerDayForDays
and the
KeepAllVersionsNewerThanDays
So a brief of what I've understand so far is
KeepLatestVersionPerDayForDays - This one keeps only 1 version for a particular content node (which is the latest version - aka last saved version) for x numbers of days. So if you set this to like 180 days. It will keep only the latest version of a content node on each day.
KeepAllVersionsNewerThanDays - This one sets how many days you want to keep the full version of your content nodes. Eg if you set it to 4 and your homepage have been saved and published like 10 times for today (that's the total number of version for that day - a total of 10 versions) and it will keep all of that full versions and the rest of the full versions of the other 4 days too.
Is there a way to disable Save and Publishing history event?
I've got a node that is on a scheduled publishing event using the Content Service's SaveAndPublish which triggers every hour.
Due to that the history of that node will grow over time.
Was wondering if there's a way to ask it ignore adding to the history for that node?
We used to have a boolean value in the old umbraco for raiseEvents which you can set to false to do that
Thanks
depend on umbraco version, umbraco has history cleanup process, you can define it more frequent for specific document type Document Type->Permission->History cleanup
raiseEvents aslo avaliable - not sure that it will do that you need
I've tried this code in Umbraco 13, it still keeps adding to the history not sure why
Yes, it should. it also will create a new version of document. I think cleanup it easy way to solve it
When you say cleanup, how do you do that?
Thanks
https://docs.umbraco.com/umbraco-cms/fundamentals/data/content-version-cleanup
This works like a charm.
But the naming is so confusing trying to figure out what each one does
Like the KeepLatestVersionPerDayForDays
and the
KeepAllVersionsNewerThanDays
So a brief of what I've understand so far is
KeepLatestVersionPerDayForDays - This one keeps only 1 version for a particular content node (which is the latest version - aka last saved version) for x numbers of days. So if you set this to like 180 days. It will keep only the latest version of a content node on each day.
KeepAllVersionsNewerThanDays - This one sets how many days you want to keep the full version of your content nodes. Eg if you set it to 4 and your homepage have been saved and published like 10 times for today (that's the total number of version for that day - a total of 10 versions) and it will keep all of that full versions and the rest of the full versions of the other 4 days too.
is working on a reply...