Search This Blog

Wednesday, 27 February 2013

Issue with Add as a new version to existing files in SharePoint 2010 Document Library


Recently I have found an unknown issue in SharePoint 2010 while upload document (from MS Office 2007) in to Document Library with the option “Add as a new version to existing files”. Below I have explained the issue in detail.

Note: Issue cannot resolve by SharePoint develpment team from Microsoft as on Feb 2013.

Issue:
ListItem Properties wiped out while upload file from MS office 2007 or MS office 2010(*.docx, *.xlsx, etc…). Review the replication procedure to understand the issue clearly.

Replication Procedure

Note: Issue can reproduce with Overwrite existing files option, when versioning not enabled.
      1.      Create a Document library
      2.      Enable versioning (Major or Minor)
      3.      Library Settings à Advanced settings àAllow management of content types à Yes
      4.      Upload a file (from MS office 2007 or MS office 2010, ie. *.docx,*.xlsx)
a.       SharePoint redirects to an application page to enter value for ListItem properties, i.e. Name, Title (Name already filled with file name)
b.      Enter value for “Title” property
      5.      Upload again the same file, which has been uploaded previously (ensure you have selected “add as a new version to existing file” check box)
a.       This time also SharePoint redirects to an application page to enter value for ListItem properties.  
b.      Expected Result: Previously entered value should be available for all ListItem properties, In our case the value for “Title” field should be available.
c.       Actual Result (Issue): Here the value for Title field is null, previously entered value is wiped out.
Repeat the step 4 and 5 with file from MS office older than 2007 or any other file type (like *.txt, *.pdf), where you won’t get the issue reported in step 5c. These file types (*.doc, *.xls, *.txt, *.pdf) are working correctly, we get our expected result (mention in step 5b). So this issue exists only with MS office 2007 and MS office 2010 files.

Refer my post in social. TechNet forum through below link

Workaround through SharePoint Development
The only way to handle the issue is “Event Receiver”, for that you should enable versioning in that document library.

No comments:

Post a Comment