Friday, September 12, 2008

Feature 'GUID' for list template 'XXX' is not installed in this farm. The operation could not be completed

Feature 'GUID' for list template 'XXX' is not installed in this farm. The operation could not be completed.
We had a client receiving this message when accessing a site, and clicking Site Actions/Manage Content and Structure.
Thanks to Fadi Noja for the resolution:
Install the Application Template Core Solution into the farm.

Link to Application Template Core Solution from Microsoft:
http://www.microsoft.com/downloads/details.aspx?FamilyId=C1039E13-94DA-4D7D-8CAE-3B96FA5A4045&displaylang=en

How to Install the Application Template Core solution (from Microsoft TechNet)
1. Download the Application Template Core solution to the server.
2. Double-click the .exe file to extract the files.
3. Open a Command Prompt window.
Note:

To open a Command Prompt window, click Start, point to All Programs, point to Accessories, and then click Command Prompt.
4. Type stsadm -o addsolution -filename \ApplicationTemplateCore.wsp, where is the location you extracted the Application Template Core files to, and then press ENTER.
5. Type stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment, and then press ENTER.
Note:

Additional attributes may be required based on your Windows SharePoint Services 3.0 configuration. For more information about available attributes, type stsadm -help deploysolution, and then press ENTER.
6. Type stsadm -o copyappbincontent, and then press ENTER.

4 comments:

Mohamed Hachem said...

Hi


if you are using vsewss tool to deploy your solution this tool generates new feature ID for the instance feature and another ID for template feature list. In fact, while deploying your solution sometimes these two features are not synchronized (depending on the order of deployment) and the instance list will point to the feature that is already unistalled hence leading to the error seen on this blog the solution is to keep the template feature and replace the default instance feature of vsewss with feature receiver that generates the instances of the lists based on the provided templates as follows :


SPSite siteCollection = SPContext.Current.Site;
SPWeb mySite = SPContext.Current.Web;
SPListTemplateCollection listTemplates = siteCollection.GetCustomListTemplates(mySite);
SPListTemplate listTemplate = listTemplates["Custom List Template"];
mySite.Lists.Add("Custom List", "A list created from a custom list template in the list template catalog", listTemplate);

Cheers

Mohamed Hachem said...

Hi

When you create list this later reference its list template using feature ID the problem is that vsewss change the feature ID when you preform new deployment what happens is that when you uninstall solution and deploy the wsp if you had a list this later will complain that it could not found the list template feature actually this list is referring to the old feature ID the same feature had been deployed with new feature ID, and hence it is not seen by the list instance. to avoid this problem dont activate/deactivate listtemplate feature when you do new deployment all will work fine

Cheers

Mohamed Hachem said...

Hi

Let’s understand what happened than the solution will be provided and it is simple one J

If you are using vsewss

{

Explanation:

When you uninstall your solution and you deploy new one vsewss generate new ID for your features. Since SharePoint works with IDs and has no semantic level to understand the features.

If you have a feature that is dependent on another feature. SharePoint will look for the dependent feature ID and will raise the error. The reality is that the feature is installed but has the old feature ID.

Solution:

1) Go to the concerned feature in the 12 or 14 hives, you must know which feature is concerned with that functionality.

2) Change the feature ID to the one raised in the error

3) stsadm -o installfeature -name -force

Test:

Try to access the functionality it should work

}

//Note: this solution works when users are using vsewss

Cheers

Bryan said...

Thank you for that follow up Mohamed, I havent come across that issue in my travels since the initial post from 2008, but I will try to duplicate in my lab to see if that solution works.

Cheers.

Bryan