Follow Me

Bug: Version comments not saved in SharePoint 2013

By Stefan Feenstra   /     Sep 27, 2013  /     Office 365, SharePoint 2013  /     1 Comment

Yesterday I discovered a new bug in SharePoint 2013 and Office 365 (2013 experience). When you upload a file to SharePoint using the upload button in the ribbon you get a dialog where you can fill in some version comments. These version comments aren’t stored in SharePoint when you check in the file you uploaded.

Steps to reproduce: 

Make sure you have the same version settings as in the screenshot below.

Document library version settings

Go to your documentlibrary and click in the Ribbon on Upload Document.

Upload Document Ribbon button

You will get the following dialog. Select a file and fill in some version comments.

Upload dialog

Click on Ok and wait untill the file is uploaded to the server. Then the following dialog appears and click on Check in.

Metadata dialog

Now when you check the version history the version comments are missing.

Version history

 

When you follow the same steps in SharePoint 2010 the version comments are stored in the version history.

SP2010 - Step4

 

Some companies heavily rely on the version history and the comments that are submitted.

Update (31-10-2013): Workaround for this problem

Update (27-11-2013): Microsoft released a cumulative update to fix this problem

Continue Reading

How to use ‘Microsoft.SharePoint.Publishing’ assembly in a Sandboxed Solution

By Stefan Feenstra   /     Aug 01, 2013  /     SharePoint 2013  /     2 Comments

When you try to use the ‘Microsoft.SharePoint.Publishing.dll’ in your sandboxed solution you will get the following error:

You could still use the benefits of ‘Microsoft.SharePoint.Publishing.dll’. First download the tool ILSpy (ILSpy is a free .NET Assembly Browser and decompiler). With this tool it’s possible to view the content of this dll file.

For example you would like to configure the associated content type of a page layout programmatically :

Normal solution with Microsoft.SharePoint.Publishing

var exampleContentType = new SPContentType(…
var examplePageLayout = new PageLayout(…
examplePageLayout.AssociatedContentType = exampleContentType;

Solution without Microsoft.SharePoint.Publishing

  1. Load the ‘Microsoft.SharePoint.Publishing.dll’ in ILSpy
  2. Search for the ‘PageLayout’ class
  3. Search for the property ‘AssociatedContentType’
  4. This property contains the following code:

  5. Now when you click on the FieldId.AssociatedContentType reference you will see this is a Guid that references to a field in SPListItem

  6. Conclusion: you could also write:

    var examplePageLayoutListItem = new SPListItem(…
    var AssociatedContentType = new Guid(“b510aac1-bba3-4652-ab70-2d756c29540f”);
    examplePageLayoutListItem[AssociatedContentType] = exampleContentType;
    examplePageLayoutListitem.Update();

Now you don’t need to use the Microsoft.SharePoint.Publishing dll in your solution. (Also working on SharePoint Online)
This was just a very small example of what you can do with the Microsoft.SharePoint.Publishing dll in a Sandboxed Solution.

Continue Reading

Never install SharePoint 2013 on a Domain Controller

By Stefan Feenstra   /     Jul 18, 2013  /     SharePoint 2013  /     3 Comments

Please keep in mind when you want to create a Single Server installation of SharePoint 2013 that you don’t install SharePoint 2013 on a Domain Controller. Some features of SharePoint 2013 don’t work when you install it on the Domain Controller. Today I found one:

When I tried to activate my Sandboxed Solution on my single server SharePoint 2013 installation it failed with the following error:

An attempt to connect to the remote activator failed with exception 'System.Runtime.Remoting.RemotingException: Cannot resolve 'channel' template reference: 'http client'.

An attempt to connect to the remote activator failed with exception ‘System.Runtime.Remoting.RemotingException: Cannot resolve ‘channel’ template reference: ‘http client’.

Then I tried to activate the same solution on a SharePoint 2013 installation with a seperate domain controller server and it worked! And when you leave the feature event receiver commented out it’s also working on the single server installation.

Continue Reading