Updating content type templates on 9000 libraries...

%3CLINGO-SUB%20id%3D%22lingo-sub-1651923%22%20slang%3D%22en-US%22%3EUpdating%20content%20type%20templates%20on%209000%20libraries...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1651923%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%20-%20I%20wanted%20to%20see%20if%20any%20of%20you%20have%20experienced%20the%20issue%20that%20I%20am%20currently%20faced%20with%2C%20and%20if%20you%20have%20any%20suggestions%20for%20how%20I%20can%20get%20out%20of%20the%20difficulty%20that%20we're%20in!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20SharePoint%20site%20with%209%2C000%20document%20libraries.%20Each%20of%20these%20libraries%20contains%20a%20standard%20set%20of%20~15%20content%20types.%20Each%20of%20these%20content%20types%20has%20a%20document%20template%20associated%20with%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20we%20have%20is%20that%2C%20if%20I%20try%20and%20update%20the%20template%20on%20any%20of%20these%20content%20types%2C%20it%20just%20says%20%22Working%20on%20it%22%20and%20never%20completes%2C%20because%20it%20turns%20out%20the%20template%20is%20physically%20copied%20to%20each%20library%2C%20and%20the%20level%20of%20processing%20involved%20in%20replacing%20them%20all%20seems%20to%20cause%20SharePoint%20to%20treat%20it%20like%20a%20denial%20of%20service%2C%20and%20blocks%20completion%20(I've%20left%20it%20running%20for%2036%20hours%2C%20and%20it%20still%20didn't%20complete).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft%20state%20that%20there%20is%20no%20limit%20to%20the%20number%20of%20libraries%20you%20can%20have%20on%20a%20site%2C%20and%20there%20is%20no%20documentation%20(at%20least%20none%20that%20I%2C%20or%20the%20MS%20rep%20from%20their%20support%20can%20find)%20stating%20limitations%20to%20content%20types%20on%20these%20libraries.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe're%20in%20difficulty%20now%20because%20this%20is%20a%20business%20critical%20solution%20that%20requires%20regular%20updates%20to%20document%20templates%2C%20but%20SharePoint%20won't%20let%20us%20do%20it%20(including%20with%20Powershell).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHas%20anyone%20else%20seen%20this%20issue%2C%20and%20if%20so%20do%20you%20have%20a%20solution%3F%20Or%20any%20ideas%20generally%20would%20be%20gratefully%20received!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1651923%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1652138%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20content%20type%20templates%20on%209000%20libraries...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652138%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400346%22%20target%3D%22_blank%22%3E%40Alex_Franklin%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhich%20version%20of%20SP%20are%20you%20working%20with%20and%20can%20you%20describe%20how%20you%20are%20doing%20this%20update%3F%20Do%20the%20templates%20include%20document%20properties%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20modern%20SP%20there%20are%20two%20ways%20of%20using%20document%20templates%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3Eby%20configuring%20the%20content%20type%20through%20the%20content%20type%20advanced%20settings%20(the%20%22classic%22%20way).%20This%20connects%20a%20template%20to%20a%20specific%20content%20type.%3C%2FLI%3E%3CLI%3Eby%20uploading%20templates%20to%20the%20library%20(the%20%22modern%22%20way).%20This%20way%20you%20can%20select%20whatever%20template%20you%20want%20and%20then%20define%20the%20content%20type%20when%20editing%20the%20document%20properties.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1652176%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20content%20type%20templates%20on%209000%20libraries...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652176%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F55998%22%20target%3D%22_blank%22%3E%40Maggan%20W%C3%A5hlin%3C%2FA%3E%26nbsp%3BThanks%20very%20much%20for%20coming%20back%20to%20me%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20using%20modern%20team%20sites%20in%20SharePoint%20Online.%20When%20we%20originally%20configured%20it%2C%20we%20had%20a%20series%20of%20content%20types%2C%20each%20with%20properties%20associated%20(mostly%20connecting%20to%20Managed%20Metadata%20sources).%20Each%20content%20type%20had%20a%20document%20template%20applied%20to%20it%20(through%20the%20advanced%20settings%20of%20the%20CT%2C%20and%20uploading%20a%20file).%20The%20issue%20now%20is%2C%20because%20of%20the%20volume%20of%20libraries%20in%20there%2C%20if%20I%20try%20and%20replace%20that%20document%20template%20in%20the%20content%20type%2C%20it%20just%20hangs%20on%20%22Working%20on%20it%22.%20I%20noticed%20that%20SharePoint%20copies%20this%20template%20to%20each%20library%2C%20so%20when%20replacing%20it%2C%20it%20first%20has%20to%20delete%20it%20everywhere%2C%20and%20then%20replace%20it%20with%20the%20new%20one%2C%20and%20this%20is%20where%20we%20have%20the%20problem.%20SharePoint%20seems%20to%20treat%20this%20like%20some%20kind%20of%20DoS%20potential%2C%20and%20hangs%20on%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20thoughts%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1652254%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20content%20type%20templates%20on%209000%20libraries...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652254%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400346%22%20target%3D%22_blank%22%3E%40Alex_Franklin%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20agree%20that%20it%20probably%20has%20to%20do%20with%20the%20large%20volume%20doc%20libs...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20PowerShell%20could%20help%20you%3F%20Found%20an%20article%20on%20this%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsimondoy.com%2F2016%2F05%2F24%2Fpowershell-update-sharepoint-content-type-document-template-script%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsimondoy.com%2F2016%2F05%2F24%2Fpowershell-update-sharepoint-content-type-document-template-script%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi everyone - I wanted to see if any of you have experienced the issue that I am currently faced with, and if you have any suggestions for how I can get out of the difficulty that we're in!

 

We have a SharePoint site with 9,000 document libraries. Each of these libraries contains a standard set of ~15 content types. Each of these content types has a document template associated with it.

 

The problem we have is that, if I try and update the template on any of these content types, it just says "Working on it" and never completes, because it turns out the template is physically copied to each library, and the level of processing involved in replacing them all seems to cause SharePoint to treat it like a denial of service, and blocks completion (I've left it running for 36 hours, and it still didn't complete).

 

Microsoft state that there is no limit to the number of libraries you can have on a site, and there is no documentation (at least none that I, or the MS rep from their support can find) stating limitations to content types on these libraries.

 

We're in difficulty now because this is a business critical solution that requires regular updates to document templates, but SharePoint won't let us do it (including with Powershell).

 

Has anyone else seen this issue, and if so do you have a solution? Or any ideas generally would be gratefully received!!

 

Cheers,

 

Alex

6 Replies

@Alex_Franklin 

 

Which version of SP are you working with and can you describe how you are doing this update? Do the templates include document properties?

 

In modern SP there are two ways of using document templates:

 

  1. by configuring the content type through the content type advanced settings (the "classic" way). This connects a template to a specific content type.
  2. by uploading templates to the library (the "modern" way). This way you can select whatever template you want and then define the content type when editing the document properties.

 

@Maggan Wåhlin Thanks very much for coming back to me :)

 

This is using modern team sites in SharePoint Online. When we originally configured it, we had a series of content types, each with properties associated (mostly connecting to Managed Metadata sources). Each content type had a document template applied to it (through the advanced settings of the CT, and uploading a file). The issue now is, because of the volume of libraries in there, if I try and replace that document template in the content type, it just hangs on "Working on it". I noticed that SharePoint copies this template to each library, so when replacing it, it first has to delete it everywhere, and then replace it with the new one, and this is where we have the problem. SharePoint seems to treat this like some kind of DoS potential, and hangs on it.

 

Any thoughts?

 

Thanks again

 

Alex

 

@Alex_Franklin 

 

I agree that it probably has to do with the large volume doc libs...

 

Maybe PowerShell could help you? Found an article on this here: https://simondoy.com/2016/05/24/powershell-update-sharepoint-content-type-document-template-script/

 

@Maggan Wåhlin 

 

We thought that too, and tried it using Powershell. The problem is that when it tries to push this out to 9000 libraries, SharePoint then blocks it, and waits between each operation (because of the large amount of activity it's a potential performance threat). Each time it doubles the amount of time it waits, which is then an ever-increasing number. Last time I gave up after running the update for 36 hours straight :(

 

 

@Alex_Franklin 

 

A few months ago, I had a similar issue. We were updating metadata for a couple of thousand docs and it caused a hang up. We later identified that if a document was opened by a user, that document got locked and caused the script to fail after a lot of attempts. Have you tried making sure that all docs are closed and not checked out by any user before doing the update? Guess this might be difficult because of the huge amount of libs and docs in your case though...

 

I´m sorry, this is the last thing I can come up with for now... 

 

@Maggan Wåhlin 

 

That's a very good point, and one that we can look into as well.

 

We've come up with another potential thought, which is to use a script to manually update the content type in-place on every library (1000 at a time, to avoid throttling) so that the document template instead points to a URL of a document in a central library (rather than being attached to the content type itself). Once done, manually update the master content type with the same, but tell it not to push the changes out when saved. This way all new libraries created with these content types therefore inherit the same settings.

 

This might cause us problems down the line if we must change the content type and push changes out, but it at least gives us a short-term fix so that the templates can be updated (which is the urgent requirement).

 

Thanks for your help :)