none
Error creating subsite using custom site definition RRS feed

  • Question

  • Hi,

    We have a custom site definition based on out of box team site template; we face issues when creating subsites using this site definition. Following are few scenarios:

    1. Scenarion 1: Create site collection using the above custom site definition: Works as expected
    2. Scenario 2: Create a sub-site using above custom site definition under the site colelction created in scenario 1 (sub-site created under root site that is created using custom site definition): Works as expected
    3. Sceanrio 3: Create a site collection using OOB team site definition, and a sub-site using OOB team site definition: Works as expected
    4. Scenario 4: Create a site collection using OOB team site definition, and a sub-site under this using custom team site definition: Error occurs

    Following error occurs under Scenario 4:

    Exception in EnsureFeaturesActivatedAtWeb:
                  Microsoft.SharePoint.SPException: Provisioning did not succeed.
                  Details: Failed to initialize some site properties for Web at
                  Url: 'http://abc/sites/rootweb/testone'
                  OriginalException: The object specified does not belong to a
                  list. ---> Microsoft.SharePoint.SPException: The object
                  specified does not belong to a list.     at
                  Microsoft.SharePoint.SPWeb.GetItem(String strUrl, Boolean bFile,
                  Boolean cacheRowsetAndId, Boolean bDatesInUtc, String[] fields) 
                     at Microsoft.SharePoint.SPFile.get_Item()     at Microsoft.Sha
                  rePoint.Publishing.Internal.AreaProvisioner.<>c__DisplayClassa.<S
                  etDefaultPageProperties>b__7()     at Microsoft.SharePoint.SPSecu
                  rity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()     at
                  Microsoft.SharePoint.Utiliti...

    Further exploration reveals that the hidden web level publishing feature (ID 22a9ef51-737b-4ff2-9346-694633fe4416) fails to activate, hence the entire sub site creation is rolled back.

    The feature '94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb' depends on
                  feature '22a9ef51-737b-4ff2-9346-694633fe4416' which failed to
                  activate: Microsoft.SharePoint.SPException: Provisioning did not
                  succeed. Details: Failed to initialize some site properties for
                  Web at Url: 'http://abc/sites/Rootweb/testone'
                  OriginalException: The object specified does not belong to a
                  list. ---> Microsoft.SharePoint.SPException: The object
                  specified does not belong to a list.     at
                  Microsoft.SharePoint.SPWeb.GetItem(String strUrl, Boolean bFile,
                  Boolean cacheRowsetAndId, Boolean bDatesInUtc, String[] fields) 
                     at Microsoft.SharePoint.SPFile.get_Item()     at Microsoft.Sha
                  rePoint.Publishing.Internal.AreaProvisioner.<>c__DisplayClassa.<S
                  etDefaultPageProperties>b__7()     at
                  Microsoft.SharePoint.SPSecur...

    Few more logs as under:

    Adding list with Title='Workflow Tasks', does not exist. 
                  Creating it now.  Exception thrown was:
                  System.IO.FileNotFoundException:
                  <nativehr>0x80070002</nativehr><nativestack></nativestack>    
                  at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadat
                  aForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId,
                  Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)     at
                  Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String
                  bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId,
                  Int32& plType, Object& pvarFileOrFolder)     at
                  Microsoft.SharePoint.SPWeb.GetList(String strUrl)     at Microsof
                  t.SharePoint.Publishing.Internal.Store.GetListByUrl(SPWeb web,
                  String listUrlName)     at Microsoft.SharePoint.Publishing.Intern
                  al.ProvisioningHelper.AddList(SPListCollection ...
    Unable to locate the xml-definition for CType with
                  SPContentTypeId '0x0101007DFDDF56F8A9492DAA9366B83A95B3A0',
                  exception: Microsoft.SharePoint.SPException --->
                  System.Runtime.InteropServices.COMException:
                  <nativehr>0x8000ffff</nativehr><nativestack></nativestack>    
                  at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalC
                  ontentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object
                  varIdBytes)     at Microsoft.SharePoint.Library.SPRequest.GetGlob
                  alContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object
                  varIdBytes)     --- End of inner exception stack trace ---    
                  at Microsoft.SharePoint.SPGlobal.HandleComException(COMException
                  comEx)     at Microsoft.SharePoint.Library.SPRequest.GetGlobalCon
                  tentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object
                  varIdBytes)     at Mic...

    Failed to open the file 'C:\Program Files\Common Files\Microsoft
                  Shared\Web Server Extensions\15\Resources\cmscore.en-GB.resx'.

    #20015: Cannot open "": no such file or folder.

    Failed to read resource file "C:\Program Files\Common
                  Files\Microsoft Shared\Web Server
                  Extensions\15\Resources\cmscore.en-GB.resx" from feature id
                  "(null)".

    Failed to open the language resource keyfile cmscore.

    UserAgent not available, file operations may not be optimized.  
                   at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamCo
                  ntainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean
                  copyOnFirstWrite, Boolean disposeIlb)     at Microsoft.SharePoint
                  .SPFileStreamManager.SetInputLockBytes(Boolean copy, Byte*
                  pbData, Int32 cbData)     at Microsoft.SharePoint.Library.SPReque
                  stInternalClass.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 bstrCustomSchemaXm...

    This surprisingly works in our UAT environment, but fails in production. We have verified all features and site definitions, and thse match in both environments.

    Any assistance here will be highly appreciated, thanks!

    Best Regards,
    Kaustubh Anwekar

    Monday, November 24, 2014 6:46 AM

All replies

  • It turns out that the Restricted Readers group is natively assigned permission to several libraries in a Publishing Site Collection, such as the Master Page Gallery, the Site Collection Images, the Style Library, etc. (You can see what permissions the Restricted Readers group has by going to the View Groups page, selecting the Restricted Readers group, then clicking on the Settings item in the toolbar and selecting View Group Permissions.)

    Monday, November 24, 2014 8:43 AM