Slinger's Thoughts

September 25, 2008

Remove “overwrite current minor version” in publishing libraries.

Filed under: SharePoint — slingeronline @ 8:19 am

Building off of my post from the other day about removing the “discard checkout” option, I have also figured out how to remove the “overwrite current minor version” option in publishing document libraries.  I have now forced any of my users to keep track of all of their edits, which will prevent any nonsense from taking place.  It does seem a little harsh I know, but I look at it like locking your car doors.  It keeps the honest people honest, and removes any temptation to do something that they shouldn’t, especially since there will now be a record of any change made. 

The file we want to edit is located in the at  C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS, called “checkin.aspx”.  Again, we are not removing any of the functionality, we are simply removing the ability to call the function.  Make a copy of the file, (in case anything disastrous happens, of course).  Open the file up in your editor of choice, and edit lines 164 through 170.  I commented these out just like I did with removing the discard checkout modification, in case I will need them again.  Keep in mind though, that in this portion of the document, the code language is different, so the commenting markup is different also.  In the discard checkout solution, two slashes per line to be commented out was all that was needed.  Here, we want to bracket what we are commenting out using a tag with an exclamation point and two dashes. I agree, it would be nice if it were all the same.  I also think it would be nice if the developers would label their code segments so that you knew which part was doing what.  In any case, the code should look similar to the following; 

  <!– <asp:PlaceHolder id=”CheckinOverWriteOption” Visible=”False” runat=”server”>
        <TD><INPUT type=”radio” id=”ActionCheckinOverwrite” onclick=”EnableKeepCheckout(this.form);” name=”CheckinActionRG”></TD>
        <TD class=”ms-authoringcontrols”><asp:Label id=”CheckinOverWriteVersion” runat=”server” /></TD>
        <TD class=”ms-authoringcontrols”><label for=”ActionCheckinOverwrite”><SharePoint:EncodedLiteral runat=”server” text=”<%$Resources:wss,checkin_Overwrite%>” EncodeMethod=’HtmlEncodeAllowSimpleTextFormatting’/></label></TD>
       </asp:PlaceHolder> !–>

All we have done, is stop showing the radio button that allows a user to overwrite the current minor version.  Now, all changes are tracked individually.  This combined with removing the discard checkout option, means that any time a user wants to edit a file, it will keep a new copy of that file.  Keep in mind that this will affect your whole farm, so it’s probably not a solution for everybody.  If you want to make this affect only certain sites, or site collections, that would likely need to be coded into a feature.  Hopefully I have given someone an idea of where to start to create such a feature.  As always, comment away if you have other ideas.



  1. Nice. Can it be done in WSS 3 too?

    Comment by Craig — December 12, 2008 @ 8:48 am

  2. Nevermind, I forget that 60 is less than 12 :)

    Comment by Craig — December 12, 2008 @ 8:50 am

  3. Can we hide this option from Office when checking in document using native office client (2007 or 2003)?


    Comment by Thuy — March 31, 2009 @ 1:01 pm

    • That would be infinitely more difficult. Since instead of changing some simple asp code here or there, you would have to make some major changes to the service that provides the integration. And probably to Office itself. I’m sure you could, but I don’t think it would be only on the server. I think you would likely have to edit the WebDAV service (I could be wrong and I probably am.) as well as editing the registry of those machines that have Office to prevent that. Unfortunately that is well beyond my scope of experience.

      Comment by slinger — March 31, 2009 @ 1:31 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: