locked
Using Site Template Creates Error in Provisioning RRS feed

  • Question

  • Hi all

    I've created a site template ans tried to create a new SC based in the template. The templated site gets created (Top Level) but an error is reported. I ignored the error as everthing looked ok.

    I then tried to swith on Publishing when a error was reported, i've discovered that some of the pages (site settings > Masterpages) Associated Content Type has a #VALUE!. In my original site these seem fine with correct CT's.

    When I created the original site I switched on SharePoint Publishing Infrastructure and Publishing for the site. Then decided against publishing feature and switched it off(cant template with publishing on as it is). I created the template without Publishing Infrastructure and Publishing Features.

    Somehow I think some of the publishing attributes are being passed into the template though I've switched them off. Here is the error message when I create a templated site.

    <nativehr>0x8107058a</nativehr><nativestack></nativestack>Invalid URI: The URI scheme is not valid. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.Runtime.InteropServices.COMException: <nativehr>0x8107058a</nativehr><nativestack></nativestack>Invalid URI: The URI scheme is not valid.
    
    Source Error: 
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    [COMException (0x8107058a): <nativehr>0x8107058a</nativehr><nativestack></nativestack>Invalid URI: The URI scheme is not valid.]
       Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) +0
       Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) +172
    
    [SPException: Invalid URI: The URI scheme is not valid.]
       Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) +27992434
       Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) +28206803
       Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate) +1218
       Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Nullable`1 bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page, Boolean bDeleteOnError) +1870
       Microsoft.SharePoint.ApplicationPages.TemplatePickPage.BtnSubmit_Click(Object sender, EventArgs e) +129
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

    And here is original Master Page screen shot:

    and the templated version (faulty)


    UPDATE:

    Created a new sc with team template, activated Sharepoint Publishing Infrastructure. Exported as site template. Crreated new site from template (without error) however when I look at Master Pages  and associated columns it shows #VALUE! in most.

    When clicked on link #VALUE! get error:
    Value does not fall within the expected range

    When try to activate 'SharePoint Server Publishing' error reported:

    Index was out of range. Must be non-negative and less than the size of the collection.

    Parameter name: index


    Tuesday, December 2, 2014 9:14 AM

Answers

All replies

  • hi

    for creating site collections it is better to backup original site collection (Backup-SPSite) and then restore it (Restore-SPSite). If you will use site template created from SPWeb for restoring to SPSite there will be many problems.


    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

    Tuesday, December 2, 2014 3:32 PM
  • Hi

    I have created a master site collection and the plan was to export each and every web using save as template.

    Then create a new site collection A and apply templates to reconstruct site collection A. This will allow me to rename the permission groups as the sites get created.

    If I use Restore-SPsite then can it work in this way, i.e. I want differing site names SCA, SCB and assoicated group names. Will this work ?

    Thanks

    Wednesday, December 3, 2014 10:50 AM
  • yes, it will be possible to restore backuped site collection to another site collection with different url.

    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

    • Marked as answer by star.wars Tuesday, December 23, 2014 4:51 AM
    Tuesday, December 9, 2014 3:12 PM