locked
Unexpected error during sub site creation from template obtained by save site as template RRS feed

  • Question

  • Hi,

    I am having problem in creating a sub site from a template obtained from the save site as template option.

    I am trying to create the sub site from the same site in which i got the template. Please find the logs below,

    The element of type 'ListInstance' for feature 'testnowListInstances' (id: c97beb2d-fe8f-4f00-8898-ba1182d9a1d2) threw an exception during activation: 
    Feature Activation: Threw an exception, attempting to roll back.  Feature 'testnowListInstances' (ID: 'c97beb2d-fe8f-4f00-8898-ba1182d9a1d2').  Exception: Microsoft.SharePoint.SPException ---> System.Runtime.InteropServices.COMException (0x8007047E): <nativehr>0x8007047e</nativehr><nativestack></nativestack>     at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt, Boolean bProvisionViewsAndForms, ISPEnableModuleCallback pListInstanceModuleCallback, String bstrListInstanceSolutionInfo, String bstrListInstanceFeaturePath, String bstrListInstanceFeatureId, String bstrCustomSchemaXml, ISPEnableModuleCall...
    ...back pListTemplateModuleCallback, String bstrListTemplateSolutionInfo)     at Microsoft.SharePoint.Library.SPRequest.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt, Boolean bProvisionViewsAndForms, ISPEnableModuleCallback pListInstanceModuleCallback, String bstrListInstanceSolutionInfo, String bstrListInstanceFeaturePath, String bstrListInstanceFeatureId, String bstrCustomSchemaXml, ISPEnableModuleCallback pListTemplateModuleCallback, String bstrListTemplateSolutionInfo)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionListInstances(SPFeaturePropertyCollection props, SPS...
    ...ite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
    <nativehr>0x80070002</nativehr><nativestack></nativestack>
    Feature Deactivation: Threw an exception while unprovisioning elements: System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException)     at Microsoft.SharePoint.SPWeb.GetList(String strUrl)     at Microsoft.SharePoint.SPEventElement.UpdateEventReceiversForList(SPWeb web, SPSqlCommand sqlcmdAppendOnly, GetSqlToUpdateEventReceiversForList getSqlToUpdateEventReceiversForList, Boolean bThrowIfListNotFound)     at Microsoft.SharePoint.SPEventElement.ElementDeactivating(SPSqlCommand sqlcmdAppendOnly, SPWebApplication webApp, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.UnprovisionEventReceiverBindings(SPSi...
    ...te site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.UnprovisionElements(SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.SPFeature.UnprovisionElements(SPElementDefinitionCollection elemdefcoll, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)
    Leaving Monitored Scope (Feature Activation: Activating Feature 'testnowListInstances' (ID: 'c97beb2d-fe8f-4f00-8898-ba1182d9a1d2') at URL http://<webapplication>/sites/ConfidentialSite1/testnow1.). Execution Time=28329.427312

    Any suggestion will surely help me a lot.

    Regards,

    Neeraj.

    Sunday, August 11, 2013 6:47 AM

All replies

  • Did you save the template with or without content?

    MCITP-EA | "Never test how deep the water is with both feet"

    Sunday, August 11, 2013 3:01 PM
  • Hi ThatGuyRyan,

    I saved the template without content

    Regards,

    Neeraj.

    Monday, August 12, 2013 1:39 AM
  • Hi wiz.neeraj,

     From the logs, it is clear that your site template is dependent on a feature named "testnowListInstances". May be scope of this list feature is "Site" or "Web". So, to make the site template work propely, you need to handle this feature first.

    Regards,

    Malkeet Singh

    Monday, August 12, 2013 8:32 AM
  • Hi Neeraj,

    Kindly check, I guess your custom feature "testnowListInstances" is not activated where you are trying to create your subsite using custom site template.

    You have two options:

    1. Activate the testnowListInstances feature and then try creating your site.
    2. Download your site template extract its content, remove that feature entry from the XML file and then repackage it, deploy and then try creating your site with your custom template. (This may lead you to come to know about some other feature which is required to work this template properly.)

    #RoHsTr

    Monday, August 12, 2013 12:08 PM
  • Hi Malkeet,

    The problem here is that I am unable to find such a feature. May be it is a SharePoint Internal feature. Not sure.

    Regards,

    Neeraj

    Monday, August 12, 2013 5:51 PM
  • Hi wiz.neeraj,

    The error message shows there is a list instance related feature “testnowListInstances” not able to work, would you please check whether you have such a list instance on the site that been saved as template? Or whether there is such a feature in Site Features or Site Collection features.

    If so, delete the feature/list instance, check whether the issue is caused by it.

    It seems you have a list instance deployed to the site, please make sure the list instance is created correctly withno error.

    If it isn’t the issue, please feel free to let me know.

    Thanks,


    Qiao Wei
    TechNet Community Support

    Tuesday, August 13, 2013 3:53 AM
  • Hi Neeraj,

    As the name suggest (testnowListInstances) this ain't a SP OOB feature.

    As I described earlier also in point 2 in my previous post:

    Try downloading the WSP of your custom site template and extarct it and look for the testnowListInstances feature in the XML file if it is there remove it and then try repackaging it through WSP Builder or some other tool as you want and then try creating your site after deploying this new WSP using your template.


    #RoHsTr

    Tuesday, August 13, 2013 4:50 AM
  • Hi Neeraj,

    "testnowListInstances" is not a sharepoint OOB feature.  If your problem is not resolved, can u please create the new site from the template at the same level from which you have create "Site Template".

    Otherwise you can do one thing, remove the "testnowListInstances" from central administration.

    Go to central administration > System Settings > Manage Farm Solutions, and remove the corresponding feature( please check before uninstalling, is it required or not)(Be sure only uninstall and not removed from CA to reinstall it again.

    After that, again create new site template and create site from new site template.

    Regards,

    Malkeet Singh

    Tuesday, August 13, 2013 5:05 PM
  • Hi Guys,

    Thanks for the responses.

    The problem here is that the feature "testnowListInstances" is not created by me. Its getting created automatically. For example: If the template name is "testnow" then the feature name is "testnowListInstances" and if the template name is "XXX", then the feature name in the ULS log changes to "XXXListInstances".

    Regards,

    Neeraj.

    Thursday, August 22, 2013 9:38 AM
  • Hi wiz.neeraj,

    From your description, you save a site as template, the error happens when you create site based on the template, if so, the issue is related to the original template, it contains a feature to create a list instance and feature activated when the site is created, so the error happens.

    Please check the site template file, whether it is deployed correctly with no issue. check the site that use to save as template. remove the feature on that site, save it as template, and create site again.

    Thanks,


    Qiao Wei
    TechNet Community Support

    Friday, August 23, 2013 12:16 PM
  • Hi,

    I have found the root cause of the issue.

    The issue is happening due to one of the library in my site. The library has an OOB approval workflow which will be triggered when the document is published as a major version. If the approval workflow is removed from the library and then when a site template is created, it is working fine and new site can be created using the template.

    Has any one faced such an issue or is it specific to my environment.

    Regards,

    Neeraj.

    • Marked as answer by Qiao Wei Sunday, August 25, 2013 1:54 PM
    • Unmarked as answer by wiz.neeraj Monday, August 26, 2013 12:01 PM
    Saturday, August 24, 2013 12:16 PM