2

Long story short:

I can save the parent site of a collection as a template without any issues.

If I create a blank sub-site with nothing in it at all and then attempt to save it as a template, I get an access denied.

Yes I have full control over the solutions gallery, yes I can create items there as evidenced by the parent site of the collection saving just fine as a template.

Any ideas why this would happen? It doesn't really make any sense.

Like I said, the sub-site could be ANY sub-site, even a brand new site with absolutely nothing in it.

I CAN upload to the solutions gallery as well. It doesn't seem to be an issue with the solutions gallery permissions.

I am trying to get the tech team to look into the ULS but it's hard for them on a large farm with no Correlation ID.

1
  • 2
    As a follow up to this. The site collection has publishing turned on and after reaching out to MS Support we were told that when you turn publishing on, they do not support saving sub-sites as templates at all (regardless of what the root cause of the error was). Dec 18 '14 at 5:24
1

An alternative solution for when saving a site as a template doesn't work, whether it's for size reasons or other reasons is to use the Office 365 PnP poweshell.

github

Using the Provisioning Engine built into the powershell, you can quickly extract a template of a site using Get-SPOProvisioningTemplate.

While this doesn't completely replace the export site as template. It's the best solution I was able to use for this situation recently.

0
$Web=Get-SPWeb http://Servername:port/yourSite
$Web.SaveAsTemplate("Template Name","Template Title","Template Description",1)

Try doing this with PowerShell Command

1
  • Unfortunately I don't have powershell access otherwise I would be able to avoid this all together and export the spweb. Oct 25 '13 at 14:54
0

I don't know is it resolved or not and have you access to open the site in SharePoint Designer or not but I was also facing same issue and found below solutions:
learningsharepoint

Hope this will help you.

0

If you do not have access to SharePoint designer,or powershell use browser dev tools->Open the subsite you want to save as template ->open console-> enter the following code.

SP.SOD.executeFunc('sp.js','SP.ClientContext',function(){
 var ctx = new SP.ClientContext.get_current();
 var web = ctx.get_web();
 web.set_saveSiteAsTemplateEnabled(true);
 web.update();
 ctx.executeQueryAsync(function(){
    console.log('success, this web can be saved as template</br>. Goto '+_spPageContextInfo.webAbsoluteUrl+'/'+_spPageContextInfo.layoutsUrl+'/savetmpl.aspx')
 },
 function(s,a){
    alert(a.get_message())
 });
});

you cannot see "save as template" option in site settings, but goto the url you see in log and save the ste as template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.