Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

A newly developed web part has been deployed to a half dozen site collections. We use one site collection for demo purposes. The new web part is available at all levels of that site collection, and works just fine.

In the main site collection, it is noted as as active web part in the root site of the site collection, but is not available to be deployed. In fact, some web parts that have been uninstalled are listed as available but are not actually there. Even the group heading (under which the new web part was installed) does not appear among those claimed for availability.

In short, the new web part does not appear to be available simply because the web part list does not include it (and has bogus entries). Rebooting the client machine hasn't done anything. Creating a new subsite hasn't changed anything.

Any ideas?

share|improve this question

3 Answers 3

Victor and James both state that you must "manually" take down the existing code in the gallery, but as our developer discovered, setting IgnoreIfAlreadyExists to FALSE (in the elements.xml file) allows the deployment to handle the replacement action.

I'm just adding this answer, to make that clear to future viewers of this thread.

share|improve this answer
    
Heh, just so happens I've been looking for an attribute that does exactly that in something I'm working at the minute :D –  James Love Feb 4 '11 at 18:00

Have the uninstalled web parts' .webpart files been removed from the gallery?

Does your web part development take into account the provisioning/teardown of the .webpart file in the gallery, as this will help remove inconsistencies between unavailable and listed web parts.

share|improve this answer

I'm trying to follow you, and I hope I get it right.

First of all you need to activate the feature which contains the Web Parts on each Site Collection so that the Web Parts appear in the Web Part Gallery.

The reason you see uninstalled Web Parts in the Gallery is that (by default) when a Web Part feature is deactivated, the entries (.dwp or .webpart files) in the Web Part Gallery is not removed. This is something that you manually have to do, or implement that logic in your feature deactivation code.

share|improve this answer
    
The feature is activated, and shows clearly among Site Collection Features (from the Site Settings interface). It just doesn't show when you attempt to Add Web Part. I will investigate what both of you have noted about removing old code. –  Michael Broschat Feb 2 '11 at 15:29
    
I've seen a similar issue a few times, when someone accidentally have broken permission inheritance on the Web Part Gallery catalog or manually fiddled with permissions on Web Parts in the gallery –  Wictor Wilen MCA MCM MVP Feb 2 '11 at 17:11
1  
The developer reports: "Is because of this line in the elements.xml deployment file <File Url="CQTickerWP.webpart" IgnoreIfAlreadyExists="TRUE" Type="GhostableInLibrary" > –  Michael Broschat Feb 2 '11 at 17:37
    
It's nothing wrong about that element, except that if you have IgnoreIfAlreadyExists="TRUE" you will not be able to update the file. Since it says GhostableInLibrary you will have a ghost file in the file system. –  Wictor Wilen MCA MCM MVP Feb 2 '11 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.