SharePoint versioned document magic

Bil Simser describes in post http://weblogs.asp.net/bsimser/archive/2005/06/22/414258.aspx a “bug” he encountered with versioned document libraries. When a document is saved in a versioned document library, the timestamp of the then latest version of the document gets changed to one minute before the time stamp of the new saved document.

This problem is related to one of the biggest problems I have with document libraries. A document in a versioned document library becomes a "version" when a newer version of the document is saved.

An example:

I create a document called “VersionedDoc.doc” in the document library “http://myserver/personal/serge/VersionedDocumentLibrary”.

This document is URL addressable at: “http://myserver/personal/serge/VersionedDocumentLibrary/VersionedDoc.doc”.

As soon as I save a new version of the document, this version becomes “http://myserver/personal/serge/VersionedDocumentLibrary/VersionedDoc.doc”, and my first version of the document becomes: “http://myserver/personal/serge/_vti_history/1/VersionedDocumentLibrary/VersionedDoc.doc”. This means that at the moment of saving the new version of the document, the previous version of the document gets moved to a new location. It is not already created at this location. This leads to the timestamp issue. By the way: the next version is saved as: “http://myserver/personal/serge/_vti_history/2/VersionedDocumentLibrary/VersionedDoc.doc”.

Besides the fact that the version naming schema leads to weird URL’s, it also means that you can’t provide a URL to a version of your document upfront.

If I remember correctly, SharePoint Portal Server 2001 had the possibility to address the latest document as http://…/VersionedDoc.doc, and versioned versions as http://…/VersionedDoc.doc$versionnumber. If version 4 was the latest version it was both URL addressable as http://…/VersionedDoc.doc and http://…/VersionedDoc.doc$4. It is a pity that Microsoft decided to leave this naming schema.

 

 

Published Wednesday, June 22, 2005 2:43 PM by svdoever
Filed under:

Comments

Wednesday, June 22, 2005 9:17 AM by Bil Simser

# re: SharePoint versioned document magic

Thanks Serge for the info. I call it a bug because the initial move from the doclib shouldn't trigger a modified date to change. I'm sure Microsoft will say this is by design.

Dustin suggests building an event handler to "fix" the dates (which is what the SOX accelerator has) but of course you now have to deploy extra stuff, there are issues if you already have handlers and whatnot because you can only have one, etc. Looks like I might have to build an event handler that loads other event handlers as plugins or something.

Bloody mess.
Wednesday, June 22, 2005 9:52 AM by Serge van den Oever [Macaw]

# re: SharePoint versioned document magic

Hi Bil,

I was thinking along the same lines. A generic handler added to all document libraries, and a configuration system that allows you to configure document libraries based on a class (like document libraries based on template X, or document libraries named Y in a site based on template Z) or on a per document library basis for chaining of multiple event handlers. This would still allow third party systems like Nintex to run while you can hook in your own event handlers as well.
Wednesday, June 22, 2005 12:29 PM by Bil Simser

# re: SharePoint versioned document magic

Until Microsoft changes the 1:1 restriction on event handlers and doclibs, we do need something that can handle it and chain them together. A configuration file would be a good option to so you could turn event handlers on and off across multiple portal sites. I do have a conference call with Microsquishy on this in a few minutes and I'll probably be submitting a new KB article as it's not documented anywhere I can find on this behavior. Thanks.
Monday, June 27, 2005 3:20 AM by Tariq

# re: SharePoint versioned document magic

If you guys are starting a community project for this, count me in. :)
- Tariq
Thursday, June 30, 2005 3:31 AM by Erik van Zuijdam

# re: SharePoint versioned document magic

mm...bit of an "open deur" (= to obsivious) post. The whole versioning system in sps is rather useless.
Thursday, June 30, 2005 5:29 AM by Serge van den Oever [Macaw]

# re: SharePoint versioned document magic

Erik, I think that it isn't fair to call the versioning system in SharePoint useless. It works quite well, there are just some implementation issues that lead to problems if you want to use the versionning system for things the design team did not initially make it for. It woks perfect to revert to a previous version of a document if you need to.
Wednesday, July 06, 2005 10:26 AM by Marc, blij blij, van Doorn

# re: SharePoint versioned document magic

WTF ?!?!
Thursday, May 03, 2007 6:30 AM by Ram

# re: SharePoint versioned document magic

Hi All, i agree with serge van den. Sharepoint isn't useless except this bug. In fact if one knows about this bug well before customizing the portal can write a single handler for handling this version issue too.

Well for the ones like us wherein we didn't knew about the issues while cutomize/desinging our app, we have to wait for MS to release a patch or SP to fix it.

Rgds,

RAM, LogicaCMG

Wednesday, June 20, 2007 5:01 AM by Gangtha

# re: SharePoint versioned document magic

Is there a fix for this?

Leave a Comment

(required) 
(required) 
(optional)
(required)