What?
How to deactivate and delete a sandbox solution (site template) that throws exception from UI?
Why?
Created a SharePoint 2010 team site (web) and saved it as a site template.
Created a new site using the newly created site template.
Delete the site with which the site template was created.
Attempted to deactivate the site template and it fails with the below exception:
Unable to access web scoped feature (Id: GUID) because it references a non-existent or broken web (Id: GUID) on site 'url'. Exception: System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)
How to deactivate and delete a sandbox solution (site template) that throws exception from UI?
Why?
Created a SharePoint 2010 team site (web) and saved it as a site template.
Created a new site using the newly created site template.
Delete the site with which the site template was created.
Attempted to deactivate the site template and it fails with the below exception:
Unable to access web scoped feature (Id: GUID) because it references a non-existent or broken web (Id: GUID) on site 'url'. Exception: System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)