09-10-2020 12:43 AM
09-10-2020 12:43 AM
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!!
09-10-2020 01:59 AM
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:
09-10-2020 02:10 AM
@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.
09-10-2020 02:21 AM
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/
09-10-2020 02:34 AM
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 :(
09-10-2020 03:05 AM
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...
09-10-2020 03:10 AM
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 :)