?
Solved

Can't remove a feature

Posted on 2013-01-25
9
Medium Priority
?
456 Views
Last Modified: 2013-02-05
I'm doing a tutorial on features. Somehow, I managed to add two features at the site collection level with the same exact display name in the features management window. I don't know how that can possibly happen, but I saw two features with the same name in features management.

I deactivated both features, then went to the features folder and saw one folder that matched the name of both features. I ran an uninstallfeature in stsadm and it succeeded.

Saw only one copy of the feature in features management instead of two. Ran uninstallfeature with the same name again hoping it would uninstall the remaining feature, but it said that feature is already uninstalled.

I removed the feature's folder under the features folder and now I'm still stuck with one remaining feature in the features management that I can actually still activate and deactivate. But I can't find the features folder that this has to be using. There is no folder left in features that matches it's name because I removed it. So how can I get rid of this?
0
Comment
Question by:BobHavertyComh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38818922
Hi,
there will be scripting solutions as well, but perhaps you want to try:
http://spm.codeplex.com/

Use the appropriate version.

HTH
Rainer
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38818981
I already have that software, but I can't find anything that resembles the name of the feature. Am I looking in the wrong place within the tool?
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38819134
Hi,
yes, you would have to go through all features.

I hope you are on SharePoint 2010.
Here is a PowerShell script. Just open SharePoint Management Shell, adjust the output path and run the script.
It will list the GUID, title, the displayname and the root directory (sorted by Title).
Get-SPFeature | Sort @{Expression={$_.GetTitle(1033)}} -Descending:$false | ft @{Label='ID';Width=40;Expression={$_.Id}}, @{Label='Title';Width=80;Expression={$_.GetTitle(1033)}},@{Label='DisplayName';Width=80;Expression={$_.DisplayName}},@{Label='RootDirectory';Width=250;Expression={$_.RootDirectory}} | Out-File -Width 500 "C:\Temp\features.txt"

Open in new window


HTH
Rainer
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38819236
OK, I saw the feature in the output file. Suddenly, I can no longer see the feature in the SP feature manager for activation/deactivation. That's good. Maybe it was merely an IE caching issue.

But I don't understand why this feature even shows up in the output when there is no corresponding folder for it in the features folder. I want to completely wipe this out so that it doesn't even show up on any output.

If it makes any difference, the only way that I can figure out that I could have created two features with the same name is because I gave them two different guids. This was a learning attempt at creating features, and the second copy was a retry of the same thing, most likely with a different guid entered, but everything else the same.
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 1500 total points
ID: 38819404
Hi,
that will go very very deep into how SharePoint handles its contents, but I think that SharePoint would not recognize / verify, if you delete the folder, as I assume that he stores the feature information also somewhere in the admin database.
I had even once the issue, that after just replacing a script file in a feature folder, it has been overwritten when the web application has been extended for another authentication.

To get rid of that orphaned feature, I would suggest to retract and remove the complete solution (if this is possible in your environment).

HTH
Rainer
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38819644
Hi Ranier, thanks. By solution, I'm assuming you are not talking about my VS solution. By solution, do you mean the site collection where this feature was deployed? If so, I think I would rather live with the orphan as it doesn't seem to be bothering anything, it just bothers me because the site collection now has an unwanted scar.

As far as your script problem, that might make sense if you edited a core feature, as extending the web app would probably work as sort of an upgrade, overwriting your customizations with their defaults.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38820012
Hi,
in my sense
solution == WSP package
(which is in fact most of the times also a VS solution).

And no, it has been a completely custom feature (world map web part with a lot of Javascript) with 2 big Javascript files - where one has been adjusted. The behavior has been like SharePoint extracting the content of the WSP again during the extension of the second web app (so one content database for both, one app with windows for internal user, one with custom login modules for "external").
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38822210
I don't believe that I ever deployed a solution using VS or anything else, I manually deployed a feature by creating feature.xml and elements.xml, copying them to their feature folder under SP root and then running installfeature in stsadm. I know that VS will do all of this stuff for you automatically, but the course I'm watching thinks it's a good idea to do it manually so that you really understand what going on underneath the hood. I really don't have a solution per say and all of this could have been done in notepad. .The feature folder that contained these files is already gone, so I apologize but I still don't understand what you mean because it seems to me that there is no solution to delete. I'm still a novice trying to learn this stuff so i hope you can be patient with me..
0
 
LVL 9

Author Closing Comment

by:BobHavertyComh
ID: 38857721
The accepted solution is correct in a VS solution package situation, but i was performing this manually rather than through VS. I should have run remove -spFeatureFromContentDb, but I saw another article that suggested to carefully remove the offending entries from the features table in the content db if all else failed. Carefully removed the entries manually in SQL Studio, and it seems to have luckily worked so maybe remove -spFeatureFromContentDb luckily does only what I did manually and runs no other operations.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question