3

I have web site with template "Team site". When i saving site as template;

Fill template form: enter image description here Then i click button OK, and have following error: enter image description here

This is error by corelation ID from log files:

System.InvalidOperationException: Error copying temporary solution file to solutions gallery: _catalogs/solutions/LirexTempProject.wsp
at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl, Action`1 solutionPostProcessor, Boolean activateSolution) at Microsoft.SharePoint.ApplicationPages.SaveAsTemplatePage.BtnSaveAsTemplate_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

When i try from PowerShell(have the same error): enter image description here

4
  • 1
    Please check logs using correlation ID. You can find there some proper error. Commented Jun 21, 2018 at 9:10
  • 1
    Don't you have to include the ".wsp" in the File name field?
    – helb
    Commented Jun 21, 2018 at 11:57
  • I'll trying with ".wsp" in file name but problem is the same..
    – Goshky
    Commented Jun 21, 2018 at 12:19
  • Did you see this related question? sharepoint.stackexchange.com/questions/60719/…
    – helb
    Commented Jun 22, 2018 at 7:02

1 Answer 1

2

Uncheck the "include content" box and see if that works first - just to prove that making templates does work.

If it does work then increase the maximum size of the templates you are able to create by running the following:

param([string]$TemplateDocSize = 50000000)

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")


write-host "Getting Current Template Document Size"
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
write-host "Current Size:" $contentService.MaxTemplateDocumentSize
write-host "Resetting to Size:" 
$contentService.MaxTemplateDocumentSize = $TemplateDocSize
$contentService.Update()
write-host "New Size: " $contentService.MaxTemplateDocumentSize 

Copied from: https://gallery.technet.microsoft.com/office/Increase-the-template-97276459

3
  • Does Not working with unchecked "include content"...
    – Goshky
    Commented Jun 22, 2018 at 6:22
  • I assume you are a site collection administrator otherwise you wouldn't have access to the options, but it may be a permissions issue if you are not. Also can you try it on a brand new empty site collection with no customisations active? I wonder if there is something enabled or configured in the site that is preventing it from saving. 'Workflow' is mentioned for instance in the error message so that may be an indication of a potential issue.
    – thekryten
    Commented Jun 22, 2018 at 7:25
  • I've been having the exact same issue. Many other are the same so it's safe to assume it's nothing related to anything you've done. I got word back on a ticket i submitted to MS saying that its an issue "affecting UK customers" but it seems that the Save as Template feature for publishing sites is now completely disabled
    – cod3r_jim
    Commented Jun 29, 2018 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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