All posts in Troubleshooting (SP 2016)

Proper way to handle workflows that throw a Microsoft.Workflow.Client.ActivityValidationException

I had to build a fairly complex workflow not long ago.  The workflow was built in SharePoint Designer 2013 and had a lot of moving parts to it.  So many, that when I went to publish it I received the following error message: “Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: Activity “SomeXActivity” has 65 arguments, which exceeds the maximum number of arguments per activity (50).”  This error message is actually telling us that our workflow has too many variables within it.  Basically, this is happening because when the workflow is running the Workflow Manager has to manage more 58 (in my case) variables.  Workflow Manager only allows there to be 50 variables in the workflow… by default.

Read more

JavaScript files not Updating in Site Assets or other SharePoint Libraries

So ran into a very weird issue.  I had just finished patching our Dev and Test servers to the November 2017 CU.  And after this occurred, any updates to solutions using JavaScript injection was not working.  I’ll describe the problem in more detail here right away, but I want to make sure I give a call out to Trevor Seward.  Trevor blogs from The SharePoint Farm and kudos goes to him for pointing me at the Blob Cache (but I am getting ahead of myself).

Read more

SharePoint People Picker Error – Item cannot be more than 256 characters.

Had a colleague ask me the other day if there was a limit on the People Picker control in SharePoint.  Reason being is that she had a Person field setup to accept multiple users and had a group that was constantly getting the error “Item cannot be more than 256 characters” when trying to enter the users.  After a bit more digging, found out they were using a list of about 20 people or so and then just pasting them into the people picker box.  They had everything correct with semicolon separators and everything, but kept getting that error.

SharePoint People Picker Error - Item cannot be more than 256 characters.

Read more

Unable to Add Existing Site Columns to Content Types in SharePoint

While deploying a new solution to our test environment for my client the other day I found that I was unable to add existing site columns to content types within the SharePoint site I was working in.  No real reason given.  As you can see from the screenshot below the GUI wasn’t much help:

Unable to Add Existing Site Columns to Content Type - GUI Error

However, as always SharePoint provided the handy-dandy correlation id.  Using that I was able to get a great deal more information on the problem.

Specifically, the problem was: “No two choices should have the same ID“.  Looking at the stack trace you can see that it looks like SharePoint is looking at the fields that exist in the site.  This makes sense because it has to build that list for you to choose from doesn’t it?  I scanned through my list of site columns and noticed that for some reason I had two columns called “Hashtags”.  I am not entirely sure what this field is for, but I believe it is added with the Newsfeed.

Unable to Add Existing Site Columns to Content Type - Multiple Hashtags

So the next step?  Well let’s delete the extra column.  Attempting to delete via the GUI just resulted in a window that never provided a response, nor deleted the offending field.  Next onto PowerShell.  While getting the field object I found that the two fields actually existed with the exact same GUID.  So that’s where the error message above came from.  While deleting via PowerShell I got a bit further and received the message: “Site columns which are included in content types cannot be deleted“.   I didn’t have a content type sitting there with Hashtags within it, so ran a script to go through each content type and to look for the field.

There were two hidden, system content types Project Policy and System Media Collection that contained the site column.  I did a few things to try and remove the site column from the content types, but I am not going to outline here because I don’t want to give any of you ideas (they aren’t something you want to do in a production environment and they didn’t work anyways).  Needless to say, I did everything I could think of but I could not remove the extra field from the sites.

Placed a call with Microsoft to see if they had any suggestions.  Apparently, according to the support engineer I worked with, Microsoft has seen this before.  Nowhere in the vast interwebs did I find this information.  One reason for this post is for prosperity ;-).  The fix is actually really simple.

Removing the Extra Field

Microsoft provided me with the feature definition of the Hashtags field.  The solution was to install the feature into the farm, activate the feature on the sub sites that had the Hashtags field existing within (whether they had the double instance or not) and then disabling the feature within the site.  Finally, we removed the feature from the farm as well.  I will provide that feature definition in this post, but want to make something very clear.  I did not create this, nor do I provide any warranty or take any responsibility if applying the solution causes instability in your farm.

You can download the feature here.

To apply the feature to correct your farm, follow these steps.

  1. Extract the zip file and place the MMSField folder in the directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\FEATURES.
  2. Open a SharePoint PowerShell window and run the following command:

  1. After the feature is added to the farm run the following script to check each sub site within your site collection to add and remove the feature (this step will force the system to remove the field and re-add it properly).

  1. Remove the solution from the farm by running the following command:

Once this is complete you will have removed the extra instances of the HashTags field and can now add site columns to your content types without issues.


Thanks for reading!

Playing Further Outside Your Sandbox: Advanced Concepts in SharePoint BCS – Slide Deck

Hi everyone,

On October 20, 2016 I had the honour of taking part in the Collab365 Global Conference.  At this conference I presented my session on Advanced Concepts in SharePoint BCS.  I forgot to provide the slide deck to the Collab365 team prior to the conference.  I have posted the slide deck here.

Playing Further Outside Your Sandbox: Advanced Concepts in SharePoint BCS slide deck.