• September 25, 2014 • / • • They other day I went to activate the Site (SPWeb) level publishing feature and I ran into an error. I tracked it down in the ULS Logs and found this entry: 11:15:04.24 w3wp.exe (0x4D94) 0x4E50 SharePoint Foundation General 75fg High Exception was thrown while ensuring dependencies met for feature ‘PublishingWeb’ (id: 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb): Microsoft.SharePoint.SPException: List does not exist. Programmatically Activating SharePoint Features. If you wanted a method which could activate a WebApplication scoped feature. Just use the SPWeb. Jun 12, 2013. The publishing feature adds a bunch of things to a SharePoint site. It is one of the features that has a site (spweb) scope but a site collection (spsite) dependency. In other words, it has to be activated at the site collection level first and then site by site must be activated at the individual site (spweb) level. Jan 04, 2013 Here is a snippet of Windows PowerShell code to list all the activated Features for a site. PowerShell to List Activated Features for a Site. He publishing feature adds a bunch of things to a SharePoint site. It is one of the features that has a site (spweb) scope but a site collection (spsite) dependency. Microsoft SharePoint Foundation offers a full object model for discovering the list of. (Microsoft.SharePoint.SPWeb) levels indicates that the feature is. The page you selected contains a list that does not exist. It may have been deleted by another user. —> System.Runtime.InteropServices.COMException (0x81020026): List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user. ![]() At Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback(String bstrUrl I did some digging and found 2 good links on the matter. The following script worked for me. Note: I have ran into this issue multiple times and the main culprit is that the Pages library (Or another publishing library) is already created when you go to enable the SPWeb SharePoint Publishing Feature. You could use PowerShell or SharePoint Manager to delete those lists. Or even to update the pages library for the SPWeb object, but this script is much easier ? Also, there was one instance where this script did not work and I needed to run the Enable-SPFeature cmdlet and use the -Force parameter. ![]() ![]() ![]() Once I did this I ran the script below and then everything started working. I know I can check the installed activated (read what Kyle said below) features of a site via SPSite.Features. I also know I can add or remove a feature via spSite.Features.Add('featureId') or.Remove. The question is: How do I check whether a feature is active? When querying SPSite.Features, I get all the features for the site, it returns SPFeature objects. But I still don't know if the feature is active or not. Basically I would like to have a bool of spSite.Features['featureId'].isActive or something similar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |