I am running into an issue when opening the Change Publishing restrictions or Publish Settings dialog and Click OK to close the wizard. All my versions for the Item are Modified with the Current Date and Time. Thus, loosing all the version history for that Item Language. Any help would be greatly appreciated.
Asked
Active
Viewed 235 times
1

user2386411
- 113
- 2
- 9
-
Interestingly I can't replicate this in 7.2. So maybe they addressed this issue in later versions. Which tab are you using in the publish settings dialog? What boxes do you tick/untick? – Martin Davies Apr 06 '15 at 11:55
-
I thank you for your gracious interest in this trying to help out. I'm using the Versions Tab in 6.6. The Publish Settings Dialog is opened with all the versions checked. and it updates all versions With or without making changes to the Dates in the Dialog. – user2386411 Apr 06 '15 at 18:34
-
2After some investigation I pretty much ended up with @nsgocev's answer. Recommend using that. – Martin Davies Apr 07 '15 at 07:33
1 Answers
2
This is not possible out of the box (or as far as I am aware). You will need to modify the existing set publishing form. I posted a solution in Bit Bucket Keep in mind that this might not reflect your case as I am not sure which version of sitecore you are using. Basically the code is overriding the existing OnOK code which foreaches all the versions and updates them, adding the following line:
// Modify Here
if (string.IsNullOrEmpty(dateTimePicker1.Value) && string.IsNullOrEmpty(dateTimePicker2.Value))
{
continue;
}
It means that if both pickers were left empty - it won't modify the item version. Please keep in mind that I just smoke tested this solution, so I suggest you run it by sandbox first :)

Martin Davies
- 4,436
- 3
- 19
- 40

nsgocev
- 4,390
- 28
- 37
-
A nice solution and it Works great to address my concern. I fitted this into my VS2010 solution and sitecore v6.6. Kudos to you! DateUtil.CompareDatesIgnoringSeconds() is not available in v6.6 and looking for an alternative. – user2386411 Apr 07 '15 at 01:40
-
Hi @user2386411 I used the decompiled code from 7.2. I guess you can break the 6.6 solution and take the code there. Will modify the code when I have the chance to include 6.6 version. – nsgocev Apr 07 '15 at 04:19
-
16.6 version posted here https://bitbucket.org/nsgocev/publishing-restrictions/src/482085a60ad53a590c78342d6ed4dada3ce62fc3/VerisonSafePublishingRestrictions/SetPublishingForm66.cs?at=master – nsgocev Apr 07 '15 at 13:59